regression
Linear mixed-effects model
Model continuous outcomes with repeated or clustered observations.
Requirements
- continuous outcome
- fixed effects
- grouping variable
- enough groups
Avoid when
- one observation per group
- non-Gaussian outcome without a generalized model
Formula
y = Xβ + Zu + ε
Interpretation
Fixed effects describe population averages; random effects describe between-group variation.
Worked example
Model repeated continuous outcomes with participant-specific random intercepts.
Open example datasets