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.
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
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.