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.
Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.
Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.
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.