Multilevel Model

multilevel-modelhierarchical-modelrandom-effectsbayesianmixed-effectseducationselection-model

Definition

A multilevel model (also called a hierarchical linear model, mixed-effects model, or random-effects model) represents data with a nested structure — units ii within groups jj — by decomposing variation into within-group and between-group components. The linear predictor takes the form ηij=α+βxij+ξj+ϵij\eta_{ij} = \alpha + \beta' x_{ij} + \xi_j + \epsilon_{ij}, where ξjN(0,σξ2)\xi_j \sim \mathcal{N}(0, \sigma_\xi^2) is a group-level random effect and ϵij\epsilon_{ij} is residual error. Generalized Linear Mixed Model (GLMM) extensions allow non-Gaussian outcomes via a link function.

Key Ideas

How It Works

  1. Specify random-effect distribution: ξjN(0,σξ2)\xi_j \sim \mathcal{N}(0, \sigma_\xi^2) (or multivariate normal for multiple random effects).
  2. Integrate out ξj\xi_j to obtain the marginal likelihood p(yjθ)=ip(yijξj,θ)p(ξj)dξjp(y_j|\theta) = \int \prod_i p(y_{ij}|\xi_j,\theta) \, p(\xi_j) \, d\xi_j.
  3. 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\xi_j).
  4. Estimate (β,σξ2)(\beta, \sigma_\xi^2) by maximizing the marginal log-likelihood.
  5. Recover group-level predictions via the conditional mode (best linear unbiased predictors, BLUPs): ξ^j=E[ξjyj,θ^]\hat\xi_j = \mathrm{E}[\xi_j | y_j, \hat\theta].

Why It Matters

Open Questions

Related