BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
BrandiLeach
Calcite | Level 5

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;

1 ACCEPTED SOLUTION

Accepted Solutions
SteveDenham
Jade | Level 19

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

View solution in original post

2 REPLIES 2
SteveDenham
Jade | Level 19

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

BrandiLeach
Calcite | Level 5

Thank you for the response about ilink and the extra guidance on the OM option.  I appreciate the help!

SAS Innovate 2025: Call for Content

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!

Submit your idea!

What is ANOVA?

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.

Discussion stats
  • 2 replies
  • 2776 views
  • 0 likes
  • 2 in conversation