BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
NKormanik
Barite | Level 11

Please see the following code:

 

ods output
ParameterEstimates = sas_1.ParameterEstimates ;

 

In Proc Logistic, selection = stepwise, (and in perhaps other procedures), more than one ParameterEstimates files (datasets) are generated.  (Discovered via ods trace on.)

 

With each subsequent creation, SAS overwrites the existing ParameterEstimates file, if one exists.  So, what one ends up with (apparently) is the 'final' version.  (Please correct if I am mistaken here.)

 

With the generation of graphs, SAS auto-numbers incrementing new graphs with appended numbers.

 

Can we do similarly with the ods output to datasets?

 

If you wanted to catch each and every dataset output generated, how would you achieve this?  (Say, for instance, to compare the first with the final...)

 

Thanks!

 

Nicholas Kormanik

 

1 ACCEPTED SOLUTION

Accepted Solutions
Tom
Super User Tom
Super User

If I am reading the manual right it should be putting them all into the same dataset, not overwriting it.

If you want it to make separate datasets you should use the MATCH_ALL option.

https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/odsug/p0oxrbinw6fjuwn1x23qam6dntyd.htm

 

Prepare a SAS data set to be created.The ODS OUTPUT statement opens the OUTPUT destination. By default, the list for the OUTPUT destination is EXCLUDE ALL. This ODS OUTPUT statement puts SelectionSummary in the selection list for the destination. The MATCH_ALL option produces a SAS data set for each instance of SelectionSummary. The name of the first data set is Summary, and the name of the second data set is Summary1. ODS stores a list of these names in the macro variable list. This variable is used later in the example to combine the data sets.
ods output SelectionSummary(match_all=list) = summary;
title1 'Using the MATCH_ALL Option Produces Two Data Sets With Different Columns';

 

 

View solution in original post

5 REPLIES 5
PaigeMiller
Diamond | Level 26

Since you have already done this, show us the ODS TRACE for your PROC LOGISTIC. Please paste the ODS TRACE output into the window that appears when you click on the </> icon so as to preserve the formatting.

--
Paige Miller
NKormanik
Barite | Level 11
Output Added:
-------------
Name:       ParameterEstimates
Label:      Parameter Estimates
Template:   Stat.Logistic.ParameterEstimates
Path:       Logistic.Step0.ParameterEstimates
Label Path: 'The Logistic Procedure'.'Step 0'.'Parameter Estimates'
-------------

Output Added:
-------------
Name:       ParameterEstimates
Label:      Parameter Estimates
Template:   Stat.Logistic.ParameterEstimates
Path:       Logistic.Step1.ParameterEstimates
Label Path: 'The Logistic Procedure'.'Step 1'.'Parameter Estimates'
-------------

Output Added:
-------------
Name:       ParameterEstimates
Label:      Parameter Estimates
Template:   Stat.Logistic.ParameterEstimates
Path:       Logistic.Step2.ParameterEstimates
Label Path: 'The Logistic Procedure'.'Step 2'.'Parameter Estimates'
-------------

snoopy369
Barite | Level 11
Not an expert at regression process, but you could try the PERSIST option (see https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/odsug/p0oxrbinw6fjuwn1x23qam6dntyd.htm) to see if it will keep it open as opposed to overwriting it.
Tom
Super User Tom
Super User

If I am reading the manual right it should be putting them all into the same dataset, not overwriting it.

If you want it to make separate datasets you should use the MATCH_ALL option.

https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/odsug/p0oxrbinw6fjuwn1x23qam6dntyd.htm

 

Prepare a SAS data set to be created.The ODS OUTPUT statement opens the OUTPUT destination. By default, the list for the OUTPUT destination is EXCLUDE ALL. This ODS OUTPUT statement puts SelectionSummary in the selection list for the destination. The MATCH_ALL option produces a SAS data set for each instance of SelectionSummary. The name of the first data set is Summary, and the name of the second data set is Summary1. ODS stores a list of these names in the macro variable list. This variable is used later in the example to combine the data sets.
ods output SelectionSummary(match_all=list) = summary;
title1 'Using the MATCH_ALL Option Produces Two Data Sets With Different Columns';

 

 

NKormanik
Barite | Level 11

Bingo, @Tom .  That did it.  Not the best wording for such an option, in my opinion.

 

ods output
FitStatistics (MATCH_ALL) = sas_1.FitStatistics ;

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 5 replies
  • 960 views
  • 5 likes
  • 4 in conversation