Programming the statistical procedures from SAS

Proc Logistic with Class Variables

Accepted Solution Solved
Reply
Occasional Contributor
Posts: 6
Accepted Solution

Proc Logistic with Class Variables

Hey all,

I am trying to run a logistic regression with a combination of categorical and continous predictors.  I have specified the class variables before the model statement using "class".  Whenever I run the proc logistic, the output is just a matrix of 0's and 1's labeled "Class Level Information.  Design Variables" I am not sure what this means but what I want is for SAS to return a list of models ranked from lowest AIC to highest.  Can anyone help with this?  Thanks.

Here is my code:

rsubmit;

proc logistic data=work.**** outest=betas covout;

        class x1 x2 x3 x4 x5 x6 x7 / param=glm;

        model TARGET(event='1')= x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 x15 x16 x17 x18 x19 x20 x21 x22 x23 x24 x25 x26 x27 x28 x29 x30 x31 x32 x33 x34 x35 x36 x37 x38 x39 x40

        / selection=stepwise include=8 slentry=.3 slstay=.4 details lackfit rsq;

run;


Accepted Solutions
Solution
‎10-29-2014 02:38 PM
Valued Guide
Posts: 2,108

Re: Proc Logistic with Class Variables

Please post your log.  I suspect that the model is overparameterized.

STEPWISE will not provide an AIC rank ordering.  In order to get that, with 100% confidence, you will need to do all possible regressions (a manual task in LOGISTIC), OUTPUT the ODS tables including the parameters and the AIC, sort, and write your own report.  It is messy, but certainly can be done.

View solution in original post


All Replies
Solution
‎10-29-2014 02:38 PM
Valued Guide
Posts: 2,108

Re: Proc Logistic with Class Variables

Please post your log.  I suspect that the model is overparameterized.

STEPWISE will not provide an AIC rank ordering.  In order to get that, with 100% confidence, you will need to do all possible regressions (a manual task in LOGISTIC), OUTPUT the ODS tables including the parameters and the AIC, sort, and write your own report.  It is messy, but certainly can be done.

Occasional Contributor
Posts: 6

Re: Proc Logistic with Class Variables

Thanks for the help! I ended up just using a best subsets with score chi-square.

☑ This topic is SOLVED.

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

Discussion stats
  • 2 replies
  • 207 views
  • 1 like
  • 2 in conversation