I've got a dataset of students in schools for which I've imputed 20 datasets, and I'm estimating the effect of an individual attribute x2 on a response variable y along with a cross-level interaction effect of that individual attribute with a binary level 2 variable x3 that distinguishes between two types of schools. I've fit a two-level mixed effects model of response variable y on several individual level predictors and a random intercept at the school level. It's essentially the same as xtreg, re.
Code:
mi estimate: mixed y x1 x2 i.x3 c.x2##i.x3 || school : , mle vce(cluster school)
Code:
mimrgns i.x3, at(x2=(-5(0.1)5)) atmeans asbalanced cmdmargins marginsplot
Is there any way, in the MI context, to do this?
Thank you,
Kerby
0 Response to how to include random intercept in predicted margins and plot after mi estimate: mixed
Post a Comment