04-03-2017 06:50 AM
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.
04-03-2017 09:25 AM
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.
04-03-2017 09:59 AM
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:
Label: Parameter Estimates
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.
04-03-2017 12:53 PM
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).