Hey all -

I am a newbie on mixed-effects models. I want to estimate the following
model:

Y_it = alpha_0t + alpha_1t*X_it + e_it
alpha_0t = gamma_00 + u_0t
alpha_1t = gamma_10 + gamma_11*W_it + u_1j

Where Y is my outcome, X is my level-1 predictor, and W is my level 2
predictor.

I am not sure if I am doing it right. Is this the correct specification of
the formula?

model = lmer(Y ~ X + X:Y + ( X | ID), data = data)

Also, can you help me to write down the combined model formula? I tried
by substituting on the first equation, but I got some weird interactions
with the residual (?)

Thanks a lot!

- Camila

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to