Solved
Contributor
Posts: 42

# How to output odds ratios in Proc Genmod?

/*for continuous independent variable age*/

PROC GENMOD DATA = TEMP;

CLASS ID age ;

MODEL Y (EVENT = '1')  = age /dist=bin link = logit;

REPEATED SUBJECT = ID /TYPE = exch;

RUN;

/*for categorical independent variable gender*/

PROC GENMOD DATA = TEMP;

CLASS ID gender ;

MODEL Y (EVENT = '1')  = gender /dist=bin link = logit;

REPEATED SUBJECT = ID /TYPE = exch;

RUN;

Y is binary, 0 or 1.

Thank you!!!

Accepted Solutions
Solution
‎02-07-2014 05:54 PM
Contributor
Posts: 50

## Re: How to output odds ratios in Proc Genmod?

Use  estimate statement.

PROC GENMOD DATA = TEMP;

CLASS ID gender ;

MODEL Y (EVENT = '1')  = gender /dist=bin link = logit;

REPEATED SUBJECT = ID /TYPE = exch;

ESTIMATE 'GENDER EFFECT' gender 1 -1/EXP;

RUN;

All Replies
Solution
‎02-07-2014 05:54 PM
Contributor
Posts: 50

## Re: How to output odds ratios in Proc Genmod?

Use  estimate statement.

PROC GENMOD DATA = TEMP;

CLASS ID gender ;

MODEL Y (EVENT = '1')  = gender /dist=bin link = logit;

REPEATED SUBJECT = ID /TYPE = exch;

ESTIMATE 'GENDER EFFECT' gender 1 -1/EXP;

RUN;

Contributor
Posts: 42

## Re: How to output odds ratios in Proc Genmod?

Thanks so much. It's working for the categorical variable gender!

When it comes to continuous variable, how to fit it to the estimate statement?

Thank you for your great help!

🔒 This topic is solved and locked.