2
$\begingroup$

I am trying to estimate a three-level model in R using lmer, and I'm a bit confused on a few things, both statistical theory and estimating the model in R.

The data is repeated measures (pre-test vs. post-test, so t=0 or t=1), nested in individuals, nested in programs. I am interested in two things. First, the 40-ish programs fall into 3 "groups". I want to examine the intercept and slope of each group. (The slopes of the groups should show which groups are most/least effective.) Second, I want to know how individual-level covariates affect both intercepts and slopes.

First, this is my interpretation of the statistical equation. Does this look right? Let t $\in [0,1]$ be the repeated measures, $i$ represent an individual, and $j$ represent a program.

Level 1:

$Y_{tij} = \beta_{0ij} + \beta_{1ij} * time_{tij} + error$

Level 2:

$\beta_{0ij} = \pi_{0j} + \Theta_0 * INDIVIDUAL COVARIATES_{ij} + error$

$\beta_{1ij} = \pi_{1j} + \Theta_1 * INDIVIDUAL COVARIATES_{ij} + error$

Level 3:

$\pi_{0j} = \rho_{01} * GROUP1 + \rho_{02} * GROUP2 + \rho_{03} * GROUP3 + error$ $\pi_{1j} = \rho_{11} * GROUP1 + \rho_{12} * GROUP2 + \rho_{13} * GROUP3 + error$

I understand everything except the part dealing with the individual covariates. I do not care about the interaction of program with individual covariates. Is this the right spot to put individual covariates, or am I off base here?

Second, I want to implement this using the lmer package in R. I'm just utterly at a loss on how to do this.

This source (http://rpsychologist.com/r-guide-longitudinal-lme-lmer) discusses a conditional three-level growth model, which seems close, but I do not understand the $(time*tx)$ [I guess $(time*group1)$,$(time*group2)$ etc.] notation at all, nor do I understand how to include individual covariates.

Any help would be deeply appreciated!

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.