BookmarkSubscribeRSS Feed
SasNewb1
Calcite | Level 5

 

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;

 

 

 

4 REPLIES 4
DHINESHSHANKAR0
Fluorite | Level 6

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. 

clim072
Fluorite | Level 6

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.

 

Reeza
Super User

Have you tried the ODDSRATIO statement?

Ksharp
Super User
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......

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 4 replies
  • 1747 views
  • 2 likes
  • 5 in conversation