The SAS Output Delivery System and reporting techniques

ODS select: selecting only the final ParameterEstimates and Association in PROC LOGISTIC

Reply
New Contributor
Posts: 2

ODS select: selecting only the final ParameterEstimates and Association in PROC LOGISTIC

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.

 

Esteemed Advisor
Esteemed Advisor
Posts: 6,704

Re: ODS select: selecting only the final ParameterEstimates and Association in PROC LOGISTIC

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.

New Contributor
Posts: 2

Re: ODS select: selecting only the final ParameterEstimates and Association in PROC LOGISTIC

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.

Esteemed Advisor
Esteemed Advisor
Posts: 6,704

Re: ODS select: selecting only the final ParameterEstimates and Association in PROC LOGISTIC

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).

Post a Question
Discussion Stats
  • 3 replies
  • 57 views
  • 0 likes
  • 2 in conversation