What is a mixed-effects model?
hardAnswer
- y = Xβ + Zu + ε, where β = fixed effects (population-level slopes), u = random effects (subject / cluster deviations), u ~ N(0, G), ε ~ .
- Uses: repeated measures on subjects, hierarchical data (students in schools, users in accounts), longitudinal panels.
- Handles within-cluster correlation → correct SEs.
- Fit by REML or Laplace-approximated MLE (lme4, statsmodels, brms).
- Foundation of hierarchical Bayesian modeling.
Check yourself — multiple choice
- Only fixed effects
- y = Xβ + Zu + ε with u ~ N(0, G) random effects; handles hierarchical / longitudinal / clustered data; correct within-cluster SEs; fit by REML / lme4
- Same as OLS
- Requires binary
Mixed-effects: fixed + random effects; hierarchical / clustered data.
#mixed-effects#regression
Practise Statistics Fundamentals
215 interview questions in this topic.
Related questions
- Random intercepts vs random slopes — the difference.
- Cluster-robust standard errors — when to use?
- Mixed-effects vs cluster-robust SEs — which do you pick?
- You have 50,000 measurements from 200 patients. What is your sample size?
- Prediction interval vs confidence interval — the difference.
- What are the Gauss-Markov assumptions for OLS?