piravi
piravi

Reputation: 209

A full parameterized model

I have a model like this:

fm<-lmer(V4 ~ V2 * V3 + (1 | V1), data = data)

I want to obtain the full parameterization of it, with random intercept and randon slope. I can use this model?

fm<-lmer(V4 ~ V2 * V3 + (1 + V2 + V3 | V1), data = data)

Upvotes: 0

Views: 34

Answers (1)

Maurits Evers
Maurits Evers

Reputation: 50678

The most general model with group-wise (i.e. random) intercepts and slopes for V2 and V3 would be

lmer(V4 ~ V2 * V3 + (V2 * V3 | V1), data = data)

Taking into account that V2 * V3 is short for V2 + V3 + V2:V3 we can identify the following terms:

  1. A fixed effect offset (from the implicit 1 +)
  2. A fixed effect slope for V2
  3. A fixed effect slope for V3
  4. A fixed effect interaction term between V2 and V3
  5. A random effect offset deviation for every level of V1 (from the implicit (1 + ... | V1)
  6. A random effect slope deviation for V2 for every level of V1
  7. A random effect slope deviation for V3 for every level of V1
  8. A random effect interaction term characterising the deviation from the fixed effect V2-V3 interaction for every level of V1
  9. All correlations between random effects

The Cross Validated post R's lmer cheat sheet is a great resource for understanding the individual terms, and how to successively build the most general model.

Upvotes: 1

Related Questions