Multilevel modelling - r assignment

7 important questions on Multilevel modelling - r assignment

What kind of model is this?
y ~ 1 + (1|id)


This is an unconditional means model with a random intercept for each individual (patdeid).
• It estimates the overall mean y (intercept) and accounts for individual variability around this mean.
No fixed effects are included, so it provides an estimate of the overall variability in y

What kind of model is this?
y ~ 1 + time + (1|id)


This model includes a fixed effect for time, allowing for an overall linear trend in quality of life over time.
• It also includes a random intercept for each individual, accounting for individual variability in baseline y. But no random slope

What kind of model is this?
y ~ 1 + time + (1 + time |id)

This is a conditional means model with random intercepts and random slopes
  • Higher grades + faster learning
  • Never study anything twice
  • 100% sure, 100% understanding
Discover Study Smart

If i would extend this model with more fixed effects, where would i place them in the formula and what would this mean?

  • They would be placed outside the brackets this means that these variables cannot vary at level 1, the individual, only at level 2 between individuals.

How can you calculate what percentage of variation in the dependent variable is explained by a fixed effect when you add it to the model?

  • Take the residual variance from the unconditional mean model and see by what percentage it has decreased in the model where the fixed effect is added. That is the percentage of variance that is explained by the fixed effect.
  • (old resid var - new resid var) / old resid var

Where is the largest variation/differences between subjects?

  • The largest variation / differences between subjects lies in the intercepts, because there is much more variance in the intercepts (190.857) than there is in the slopes (4.302). In other words, there is much more variability in the intercepts between individuals that there is variability in the slopes between individuals.

In this model: QOHLTHST ~ 1 + time + (1 + time|patdeid)
How can you control for gender and how can you control for treatment?

  • Controlling for gender: QOHLTHST ~ 1 + gender*time + time + (1 + time|patdeid)
  • Controlling for treatment: QOHLTHST ~ 1 + treatment*time + time + (1 + time|patdeid)
  • controlling for both: QOHLTHST ~ 1 + treatment*time + gender*time + time + (1 + time|patdeid)
  • a rule of thumb is that t-values higher than 2 or lower than -2 indicate a probably significant effect.
  • look at t value of main effect, not interaction effect gender is significant.

The question on the page originate from the summary of the following study material:

  • A unique study and practice tool
  • Never study anything twice again
  • Get the grades you hope for
  • 100% sure, 100% understanding
Remember faster, study better. Scientifically proven.
Trustpilot Logo