Programming the statistical procedures from SAS

Output Proc Logisitic into a dataset

Accepted Solution Solved
Reply
Contributor
Posts: 66
Accepted Solution

Output Proc Logisitic into a dataset

Hi,

I am using the following code:

PROC LOGISTIC DATA=A.DATA_VARCLUS_CORR DESCENDING;

MODEL TARGET=&VARLIST2

/SELECTION=STEPWISE SLS=0.01 SLE=0.01;

RUN;

As a result of the code above, I get an output that includes, among other things, the following:

Analysis of MaximumLikelihood Estimates

                                                  Standard          Wald

        Parameter               DF   Estimate       Error    Chi-Square    Pr > ChiSq

This output is outputted into a window. I would like to have the output into a separate file, in particular fields that I havehighlighted in red.

I tried to use OUTMODEL= option, but that doesnt seem to output what I need.

Thanks for your help.


Accepted Solutions
Solution
‎03-15-2012 04:25 PM
Respected Advisor
Posts: 4,606

Output Proc Logisitic into a dataset

Add the statement:

ods output ParameterEstimates=myParameterEstimates;

after your model statement. Run the procedure and look into the myParameterEstimates dataset.

PG

PG

View solution in original post


All Replies
Solution
‎03-15-2012 04:25 PM
Respected Advisor
Posts: 4,606

Output Proc Logisitic into a dataset

Add the statement:

ods output ParameterEstimates=myParameterEstimates;

after your model statement. Run the procedure and look into the myParameterEstimates dataset.

PG

PG
Contributor
Posts: 66

Output Proc Logisitic into a dataset

Thanks PG for your response.

in the ParameterEstimates statment, my variable names are being truncated, is it possible to set the variable field length to $32, and select based on ProbChiSq = <.0001 ?


Grand Advisor
Posts: 16,875

Output Proc Logisitic into a dataset

Try the namelen= options in proc logistic statement.

ie proc logistic data=have namelen=32

Respected Advisor
Posts: 4,606

Output Proc Logisitic into a dataset

You may also add:

ods output ParameterEstimates=myParameterEstimates(where=(ProbChiSq<0.0001));

if you wish to keep only those cases.

PG

PG
Contributor
Posts: 66

Output Proc Logisitic into a dataset

Perfect, thank you both.

☑ This topic is SOLVED.

Need further help from the community? Please ask a new question.

Discussion stats
  • 5 replies
  • 151 views
  • 6 likes
  • 3 in conversation