Definition
A multilevel model (also called a hierarchical linear model, mixed-effects model, or random-effects model) represents data with a nested structure — units i within groups j — by decomposing variation into within-group and between-group components. The linear predictor takes the form ηij=α+β′xij+ξj+ϵij, where ξj∼N(0,σξ2) is a group-level random effect and ϵij is residual error. Generalized Linear Mixed Model (GLMM) extensions allow non-Gaussian outcomes via a link function.
Key Ideas
- Partial pooling: Group-level estimates shrink toward the overall mean in proportion to group size and σξ2; small groups borrow strength from the full sample. The shrinkage coefficient is λj=σξ2/(σξ2+σϵ2/nj) — Bühlmann credibility in actuarial terms.
- Intraclass correlation (ICC): ρ=σξ2/(σξ2+σϵ2) measures the proportion of total variance attributable to group membership. ICC near 0 → ordinary least squares (OLS) with cluster-robust standard errors (SEs) suffices; ICC near 1 → group effects dominate.
- Random intercepts vs. random slopes: The simplest model allows only intercepts ξj to vary across groups. Random slopes extend this to allow coefficient heterogeneity: ηij=αj+βj′xij, with (αj,βj) jointly normal.
- GLMM extension: Replace the linear response with g(μij)=ηij for link g. For multinomial logit with M categories: ηij(m)=α(m)+β(m)′xij+ξj(m), where cluster-level effects (ξj(1),…,ξj(M−1)) are jointly normal with unrestricted covariance matrix.
- Selection extension (S&P model): When outcome is observed only for a selected subset (non-ignorable missing data), a joint selection-and-principal (S&P) equation links a binary selection indicator to the principal multinomial equation via shared cluster random effects. Identification requires individual-level exclusion restrictions. Grilli-Rampichini (2006) show the subject-level selection-principal covariance is unidentified and omit it.
- Estimation: Marginal likelihood via adaptive Gaussian quadrature (Stata
gllamm); Laplace approximation (R lme4); full Bayesian Markov Chain Monte Carlo (MCMC) (Stan, JAGS) propagates uncertainty in variance components.
How It Works
- Specify random-effect distribution: ξj∼N(0,σξ2) (or multivariate normal for multiple random effects).
- Integrate out ξj to obtain the marginal likelihood p(yj∣θ)=∫∏ip(yij∣ξj,θ)p(ξj)dξj.
- For GLMMs the integral is intractable; evaluate numerically via Gauss-Hermite quadrature (accuracy increases with number of quadrature points; adaptive quadrature recenters nodes at the posterior mode of ξj).
- Estimate (β,σξ2) by maximizing the marginal log-likelihood.
- Recover group-level predictions via the conditional mode (best linear unbiased predictors, BLUPs): ξ^j=E[ξj∣yj,θ^].
Why It Matters
- Correct inference: Ignoring clustering inflates effective sample size, leading to anti-conservative tests. Multilevel models give correct standard errors for cluster-correlated data.
- Explanatory decomposition: ICC quantifies how much of the outcome variance is "explained" by group membership — useful for policy (e.g., how much of skill acquisition is a university-level versus individual-level phenomenon).
- Non-ignorable missing data: The S&P extension (Grilli-Rampichini 2006) handles settings where missingness depends on unobserved outcomes, with identification from exclusion restrictions rather than functional-form assumptions.
Open Questions
- Number of groups: Standard asymptotics require the number of groups J→∞; with small J (e.g., J<5), variance components are poorly identified and Bayesian priors on σξ2 matter substantially.
- Cross-classified vs. nested: Multilevel logic extends to cross-classified designs (students in schools × neighborhoods), but estimation is considerably harder.
- Bayesian vs. frequentist shrinkage: Both give partial pooling, but Bayesian credible intervals for variance components are generally wider and better calibrated in small samples.
Related