Programming the statistical procedures from SAS

proc logistic - generalized logit model OR

Reply
New User
Posts: 1

proc logistic - generalized logit model OR

 

I'm using SAS 9.4 and I'm running a generalized logit model in proc logistic (stepwise selection) and my outcome variable has 4 levels: A, B, C, and D.  

How can I set up my code such that the odds ratio compares A to B, B to C, C to D?  Right now SAS default compares A to B, A to C, A to D.

 

proc logistic data=data1 descending;

class  sex(ref='M') /param=ref;

model levels=weight age sex height /slstay=0.05 slentry=0.05  scale=none selection=stepwise aggregate link=glogit;

 

run;

 

 

 

Occasional Contributor
Posts: 6

Re: proc logistic - generalized logit model OR

One way for comparison among the predictor can be by standardized estimate option in the model statement ,.ie stb .

Then the absolute value of the standardized estimate can be used to provide the approzimate ranking based on relative importance of the x variables in logistic model. 

New Contributor
Posts: 4

Re: proc logistic - generalized logit model OR

Not sure if this will work but you can try adding in REF in your MODEL statement after your dependent variable.

 

For example, level B is not your reference group, this will compare B vs A, B vs C, and B vs D.

 

proc logistic data=data1 descending;

class  sex(ref='M') /param=ref;

model levels (REF = "B") =weight age sex height /slstay=0.05 slentry=0.05  scale=none selection=stepwise aggregate link=glogit;

run;

 

Hope this helps.

 

Grand Advisor
Posts: 16,875

Re: proc logistic - generalized logit model OR

Have you tried the ODDSRATIO statement?

Grand Advisor
Posts: 9,447

Re: proc logistic - generalized logit model OR

It is called  adjacent-category logit model.
try link=alogit.


data data1;
 set sashelp.class;
 if _n_ lt 6 then levels='A';
  else if _n_ lt 12 then levels='B';
   else levels='C';
run;
proc logistic data=data1 descending;
class  sex(ref='M') /param=ref;
model levels=weight age sex height /slstay=0.05 slentry=0.05  
scale=none selection=stepwise aggregate link=alogit;
run;


OR if you don't have continuous variable, you could also try PROC CATMOD.

proc catmod.........
response alogit;
model......

Ask a Question
Discussion stats
  • 4 replies
  • 133 views
  • 2 likes
  • 5 in conversation