How to output odds ratios in Proc Genmod?

Accepted Solution Solved
Reply
Contributor
Posts: 42
Accepted Solution

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;

View solution in original post


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.

Need further help from the community? Please ask a new question.

Discussion stats
  • 2 replies
  • 551 views
  • 0 likes
  • 2 in conversation