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;
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.
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.
Have you tried the ODDSRATIO statement?
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 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
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.