simplify.education

Statistics · BEGINNER LESSON

Linear mixed model

A linear mixed model is a statistical model for quantitative data that combines fixed effects, which describe average relationships, with random effects, which capture subject-to-subject variation. It is used when observations from the same subject are related, and it can handle some missing or unbalanced data under specific missingness conditions.

What it is and what it measures

A linear mixed model, often called an LMEM for linear mixed-effects model, is a way to analyze quantitative data when measurements are clustered, such as repeated measurements from the same subject. It measures how a response variable changes with predictors like time or treatment, while also measuring subject-level variability that is not the main focus but still affects the data. In these models, fixed effects describe the average relationship across all subjects, while random effects describe how individual subjects differ from that average.

[1] Beyond repeated measures ANOVA and linear mixed models [2] Linear mixed effects models - PubMed [3] Linear Mixed-Effects and Latent Curve Models for Longitudinal ...

How it works

The model combines two parts. Fixed effects estimate the average effect of variables such as time, treatment, or their interaction. Random effects account for differences between subjects, such as different starting levels or intercepts. In one common form, the response is modeled as a linear combination of predictors plus a random subject effect and an error term. Here, linear means the predictors enter as terms that are multiplied by coefficients and added together, rather than being combined in a nonlinear way. The random effects are usually assumed to follow a normal, also called Gaussian, distribution.

[1] Beyond repeated measures ANOVA and linear mixed models [2] Linear mixed effects models - PubMed [3] Linear Mixed-Effects and Latent Curve Models for Longitudinal ...

Why people use it and what it can handle

LMEMs are more flexible than traditional repeated-measures analysis of variance because they can work with unbalanced data, incomplete observations, and non-constant correlation patterns between observations. They are useful when some subjects are measured at different times or miss some visits. The model can also include interactions, such as time by treatment, to test whether change over time differs between groups.

[1] Beyond repeated measures ANOVA and linear mixed models [2] Linear mixed effects models - PubMed [3] Linear Mixed-Effects and Latent Curve Models for Longitudinal ...

Limitations and assumptions

LMEMs still have important assumptions. By default, they assume a linear relationship between the predictors and the response, so strongly curved change may fit poorly. They also impose restrictions on random effects, including independence in the random-effects structure, and their inferences are valid only under missing-at-random or completely-missing-at-random patterns. Missing-at-random means the missingness is related to other observed variables, not to the value being studied. Like other linear models, they also rely on an error structure that is appropriately modeled, and non-normal residuals may require transformation or another approach.

[1] Beyond repeated measures ANOVA and linear mixed models [2] Linear mixed effects models - PubMed [3] Linear Mixed-Effects and Latent Curve Models for Longitudinal ...

SEE THE IDEA

How a linear mixed model is built

Response data are explained by fixed effects plus random effects, with an error term for leftover variation.

The model separates average patterns from subject-to-subject differences.

TRY IT YOURSELF

Test your understanding

Choose an answer, then check the explanation.

0 of 3 questions answered
01 Which part of a linear mixed model captures how one subject may differ from the overall average starting level?
02 A study measures the same patients at baseline, 3 months, and 12 months, but many patients miss the 3-month visit. Why might an LMEM be useful?
03 Which statement best describes the word linear in linear mixed model?

PUT IT TOGETHER

Match each concept to its meaning

Drag a label onto its description, or select a label and then select a description. This also works with a keyboard.

Sources and further reading

This general lesson was generated from public source material. It explains a concept; it does not interpret a private paper or provide medical advice.

  1. Beyond repeated measures ANOVA and linear mixed models
  2. Linear mixed effects models - PubMed
  3. Linear Mixed-Effects and Latent Curve Models for Longitudinal ...
Apply this to a paper →