Hello SAS community.
I am using PROC GLIMMIX for a 2-level, non-repeated measures, logit model. I would like SAS to produce predicted probabilities for set values of a continuous variable (LMEXPROPI) for each value of a binomial variable (NATCTZN). My question is: does the ilink option used with lsmeans account for the random effects in the model? Below is the code that I am using. Thanks for any help you can give!
proc glimmix data= ipums.mex20072011_01_17_14;
where year=2007;
weight perwt;
class oldstatefip natctzn;
model moved (desc)= lnlpopn lmexpropi lc4prolaw lc4antilaw lnlavgwage lunempropi
centerage lnftotinc child education English indvunemp natctzn lmexpropi*natctzn
/dist=binary link=logit ddfm=bw solution residual;
random intercept/subject= oldstatefip solution;
lsmeans natctzn / om ilink cl;
lsmeans natctzn / om ilink cl at lmexpropi=.01;
lsmeans natctzn / om ilink cl at lmexpropi=.05;
lsmeans natctzn / om ilink cl at lmexpropi=.1;
lsmeans natctzn / om ilink cl at lmexpropi=.15;
lsmeans natctzn / om ilink cl at lmexpropi=.2;
lsmeans natctzn / om ilink cl at lmexpropi=.25;
lsmeans natctzn / om ilink cl at lmexpropi=.3;
run;
The standard errors and confidence intervals will reflect the random effects. Watch out for the use of the OM option, as the lsmeans reflect the relative proportions observed in your data, rather than equal proportions across levels of natctzn. Guessing that natctzn is 'naturalized citizen' the inference to a super population with the same distribution as your data is probably a reasonable thing. For those of us in biostats, the inference is almost always to a super population with equal distributions.
So, yes, these lsmeans statements will reflect the random effects.
Steve Denham
The standard errors and confidence intervals will reflect the random effects. Watch out for the use of the OM option, as the lsmeans reflect the relative proportions observed in your data, rather than equal proportions across levels of natctzn. Guessing that natctzn is 'naturalized citizen' the inference to a super population with the same distribution as your data is probably a reasonable thing. For those of us in biostats, the inference is almost always to a super population with equal distributions.
So, yes, these lsmeans statements will reflect the random effects.
Steve Denham
Thank you for the response about ilink and the extra guidance on the OM option. I appreciate the help!
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
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.