BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
kaushal2040
Calcite | Level 5

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 !!!

1 ACCEPTED SOLUTION

Accepted Solutions
SteveDenham
Jade | Level 19

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

2 REPLIES 2
SteveDenham
Jade | Level 19

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

kaushal2040
Calcite | Level 5

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

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 16. Read more here about why you should contribute and what is in it for you!

Submit your idea!

What is ANOVA?

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.

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