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.
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.
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.
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).
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 16. Read more here about why you should contribute and what is in it for you!
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.
Select SAS Training centers are offering in-person courses. View upcoming courses for: