- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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;
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Thank you for the response about ilink and the extra guidance on the OM option. I appreciate the help!