Programming the statistical procedures from SAS

odds ratio in Proc Glimmix

Accepted Solution Solved
Reply
Contributor
Posts: 50
Accepted Solution

odds ratio in Proc Glimmix

Hello Forum,

I am fitting random intercept logistic model using Proc Glimmix.   Code below

ODS TRACE ON;

PROC GLIMMIX DATA=SUBGROUP_LABORD;

  CLASS STUDY_SITE TRIAGE TIME_DAY AGE_CAT SEX RACE1 INSUR_CAT DIST_CAT;

  MODEL RADORD (EVENT='1')=TRIAGE TIME_DAY AGE_CAT SEX RACE1 INSUR_CAT DIST_CAT 

                           /DIST=BINARY LINK=LOGIT  DDFM=RESIDUAL SOLUTION OR;

  RANDOM INTERCEPT /SUB=STUDY_SITE SOLUTION;

  RANDOM _RESIDUAL_;

  LSMEANS TRIAGE*RACE1 / SLICEDIFF=RACE1 ODDSRATIO ILINK CL;

  LSMEANS AGE_CAT*RACE1  / SLICEDIFF=RACE1 ODDSRATIO ILINK CL;;

RUN;

ODS TRACE OFF;

I have used oddsratio statement in both model statement and lsmean statment.   I was wondering if it is allowed to use oddsratio in both statement ( one for main effects and another for interaction effect).

Thanks in advance !!!


Accepted Solutions
Solution
‎10-27-2014 12:42 PM
Respected Advisor
Posts: 2,655

Re: odds ratio in Proc Glimmix

Yes, but don't be surprised if the OR obtained from the model statement and the one obtained from the LSMEANS statement differ, especially when fitting an overdispersed binary.  However, the terms in the LSMEANS statement do not appear in the MODEL statement, and so you should be getting an ERROR in the log until you include TRIAGE*RACE1 and AGE_CAT*RACE1 in your model.

Steve Denham

View solution in original post


All Replies
Solution
‎10-27-2014 12:42 PM
Respected Advisor
Posts: 2,655

Re: odds ratio in Proc Glimmix

Yes, but don't be surprised if the OR obtained from the model statement and the one obtained from the LSMEANS statement differ, especially when fitting an overdispersed binary.  However, the terms in the LSMEANS statement do not appear in the MODEL statement, and so you should be getting an ERROR in the log until you include TRIAGE*RACE1 and AGE_CAT*RACE1 in your model.

Steve Denham

Contributor
Posts: 50

Re: odds ratio in Proc Glimmix

Thanks Steve.  I had put those interactions in the model statement but forgot to put in this part of the code.

🔒 This topic is solved and locked.

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

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