BookmarkSubscribeRSS Feed
Akos
Calcite | Level 5

I dump my stepwise logistic regression model results into an Excel file using ODS EXCEL but I save only a few of the outputs:

  

ods select NObs ResponseProfile ParameterEstimates Association ModelBuildingSummary LackFitPartition LackFitChiSq;

Is there a way to get dumped ParameterEstimates and Association tables only from the final step/iteration of the model? Right now these get dumped from each steps and I am not really interested in those as I get a good overview from ModelBuildingSummary anyway.

Thanks for any help.

 

3 REPLIES 3
RW9
Diamond | Level 26 RW9
Diamond | Level 26

Not really clear from your post here.  Are you looping over some procedure, or is this a loop within a procedure?  If its a loop around a procedure, then just call the ods select at final iteration:

...
  %do i=1 to %10;
    %if &i=10 %then %do;
      ods select nobs=number_of_observations;
    %end;
    proc...
  %end;
...
   

So on last iteration the number_of_observations dataset gets created.

If its within a procedure, the the resulting dataset at the end will have some sort of indicator for each group of data.

Akos
Calcite | Level 5

Thanks for your reply.

 

Your suggestion makes sense and would work with a loop. But there is no loop here, the outputs are created by the PROC LOGISTIC procedure and the procedure's stepwise selection.

The procedure provides path of ParameterEstimates and Association outputs in each step. For example "Step32" as below:

 

Output Added:
-------------
Name: ParameterEstimates
Label: Parameter Estimates
Template: Stat.Logistic.ParameterEstimates
Path: Logistic.Step32.ParameterEstimates
-------------

My problem is that I cannot use this path to refer to my last output, as the number of iterations resulting the final model is not known beforehand.

RW9
Diamond | Level 26 RW9
Diamond | Level 26

An example to play around with would be helpful, I am running blind here and don't use proc logistic very often.  It does however have an output out=<dataset> <options; line, does the output dataset from that not have what you want (as said can't really test it).

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 3 replies
  • 822 views
  • 0 likes
  • 2 in conversation