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.

Super User
Posts: 20,731

## Re: proc logistic - generalized logit model OR

Have you tried the ODDSRATIO statement?

Super User
Posts: 10,207

## Re: proc logistic - generalized logit model OR

```It is called  adjacent-category logit model.

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
run;

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

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

```
Discussion stats
• 4 replies
• 211 views
• 2 likes
• 5 in conversation