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 !!!
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
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
Thanks Steve. I had put those interactions in the model statement but forgot to put in this part of the code.
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 25. Read more here about why you should contribute and what is in it for you!
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.