Skip to content
Back to search results

Multilevel Modeling

Introduced by
Anthony Bryk and Stephen Raudenbush
Year
1992
Type
Method
Family
hierarchical-data-analysis
Font size

What does it do?

Multilevel modeling (also called hierarchical linear modeling, mixed-effects modeling) is a statistical framework for analyzing data organized in nested or clustered structures—students within schools, patients within hospitals, repeated measures within individuals.

Developed by Bryk and Raudenbush (1992), it accounts for dependency among observations and partitions variance into levels (within-cluster and between-cluster), enabling valid inference and revealing context effects. Essential in education, medicine, organizational research, and any field where data have natural hierarchies.

The intuition behind the method

Standard regression assumes independent observations; however, clustered data violate this. When students are nested in schools, students in the same school are more similar to each other than to students in different schools (nonindependence). Ignoring clustering leads to underestimated standard errors, overconfident confidence intervals, and inflated Type I error. Multilevel modeling solves this by (1) estimating variances at multiple levels simultaneously (within-school variance and between-school variance), (2) allowing regression coefficients to vary by cluster (random slopes), and (3) modeling cluster-level characteristics as predictors of within-cluster relationships. This captures how context affects individuals and yields valid hypothesis tests.

History

Anthony Bryk and Stephen Raudenbush's 1992 Hierarchical Linear Models textbook popularized multilevel modeling in education and social science. Harvey Goldstein's work advanced methodology for complex hierarchies and cross-classified models. Modern developments include generalized linear mixed models (GLMM; Breslow & Clayton, 1993) for non-normal outcomes, Bayesian multilevel models (Gelman & Hill, 2007), and dynamic models (latent growth curves; Raudenbush, 2001). Software advances (lme4, nlme, MLwiN, HLM) made multilevel analysis accessible.

When to use it

Use multilevel modeling whenever observations are nested: students in schools (education), patients in hospitals (medicine), employees in companies (organizational research), time points in individuals (longitudinal studies), repeated measures in subjects (clinical trials), family members in families (family studies). Ignore clustering only if ICC < 0.02 (negligible clustering). Also use when estimating cluster-specific predictions (e.g., risk-adjusted hospital mortality); random effects shrink estimates toward the grand mean, correcting for sampling variability.

Limitations and considerations

  • Requires adequate level 2 sample size: few clusters (< 10–20) produce unstable random effect estimates; fewer than 30 clusters increases uncertainty.
  • Assumes cluster membership defined a priori: cross-classified designs (students in both schools and neighborhoods) require cross-classified models, more complex to fit.
  • Asymptotic theory: standard errors and p-values are approximate; reliability decreases with small level 2 sample size. Bootstrap or permutation tests provide alternatives.
  • Model specification challenging: deciding which effects are fixed vs random, and at what level, requires careful consideration. Misspecification (e.g., omitted random slopes) yields biased fixed effects.
  • Assumes normally distributed random effects; violations at level 2 may yield biased estimates; robust methods or model checking (residual plots) help.

Source conditions do not replace independent scientific review or validation by an analysis engine.

Strengths

  • Accounts for nonindependence: yields correct standard errors and confidence intervals despite clustering; avoids Type I error inflation.
  • Partitions variance: quantifies within-cluster and between-cluster variation, revealing context effects and informing policy (e.g., school effects on achievement).
  • Random effects as predictions: empirical Bayes estimates of cluster-specific intercepts/slopes are more stable than fixed effects, useful for risk adjustment and ranking.
  • Flexible for unbalanced designs: varying cluster sizes and missing data handled naturally; does not require balanced designs.
  • Handles multiple levels: three or more levels (e.g., students within schools within districts) estimated in single model.

Applications

  • Educational research: modeling student achievement with students nested in classrooms/schools; quantifying school effects and teacher effectiveness.
  • Medical research: modeling patient outcomes (mortality, readmission) with patients nested in hospitals; risk-adjusting hospital-specific rates for quality comparisons.
  • Longitudinal studies: modeling change over time with repeated measures (level 1) nested in individuals (level 2); growth curves, trajectory modeling.
  • Organizational research: modeling employee outcomes (satisfaction, performance) with employees nested in teams/departments/organizations; assessing organizational culture effects.
  • Family studies: modeling child behavior with siblings (level 1) nested in families (level 2); family-level characteristics (SES, parenting) predict sibling similarity.

How it works

How it works

1

Administer multilevel modeling by identifying the hierarchical structure: level 1 (lowest: individuals, observations, time points) nested within level 2 (clusters: schools, hospitals, families) and optionally level 3 (organizations, districts). Record: (1) outcome variable (continuous or binary), (2) level 1 predictors (vary within clusters, e.g., student age), (3) level 2 predictors (vary between clusters, e.g., school type), (4) cluster identifier (grouping variable). Ensure adequate level 2 sample size (minimum ≥10 clusters, ideally ≥30) for stable random effects estimates. For longitudinal data: time points (level 1) nested within individuals (level 2) within groups (level 3). Assess intraclass correlation (ICC): correlation between observations in same cluster; ICC > 0.05 typically justifies multilevel analysis.

2

Fit multilevel models using restricted maximum likelihood (REML, preferred for comparing random effects) or ML (preferred for likelihood ratio tests of fixed effects). The model is specified in two levels: Level 1 (within-cluster): Y_ij = β₀j + β₁j(X_ij) + ε_ij, where i indexes individuals, j indexes clusters. Level 2 (between-cluster): β₀j = γ₀₀ + γ₀₁(Z_j) + u₀j, specifying how intercepts vary across clusters. Report: (1) Fixed effects (γ coefficients): average effect of predictors across clusters. (2) Random effects (u₀j, u₁j variances): cluster-specific deviations; large variance indicates clusters differ substantially. (3) Intraclass correlation (ICC): proportion of total variance between clusters, ICC = τ₀₀ / (τ₀₀ + σ²) where τ₀₀ is between-cluster variance and σ² is within-cluster residual variance. (4) Deviance and information criteria (AIC, BIC): compare models; lower values preferred. (5) Likelihood ratio tests: comparing models nested in fit.

3

Fixed effects (slope and intercept) represent average relationships across clusters. A fixed slope of 0.5 means on average, a 1-unit increase in the predictor associates with 0.5-unit increase in outcome across clusters, after accounting for clustering. Random intercepts allow baseline outcome to differ by cluster (between-cluster heterogeneity). Random slopes allow the effect of a predictor to vary by cluster; large random slope variance indicates covariate effects differ substantially across clusters. ICC quantifies clustering: ICC = 0.30 means 30% of variance is between clusters; 0.05 means 5% (minimal clustering). Effect sizes: report both fixed effects and variance components. Examine predicted cluster-specific slopes/intercepts (shrinkage estimates) to understand context-specific effects. Use likelihood ratio tests to compare nested models: −2 × (log-likelihood of simpler model − log-likelihood of complex model) follows χ² with df = difference in parameters.

Common pitfalls

  • Ignoring clustering entirely: treating clustered data as independent leads to underestimated standard errors and false positives.
  • Extracting raw cluster means as a new variable (ecological fallacy): means and individual-level relationships differ; use multilevel centering (grand-mean vs group-mean centered predictors).
  • Random slopes without sufficient level 2 size: estimating random slopes for all predictors with few clusters yields unstable estimates. Use fixed slopes for effects not theoretically required to vary, or use penalized estimation.
  • Misinterpreting cross-level interactions: an interaction between level 1 and level 2 predictors means the effect of the level 1 predictor depends on the level 2 context; carefully interpret and plot.
  • Model selection via p-values alone: use likelihood ratio tests or information criteria (AIC, BIC) for nested model comparison; step-wise selection unreliable with random effects.
  • Failing to check assumptions: examine level 1 and level 2 residuals for normality, homoscedasticity, and outliers; violations suggest transformation or robust methods.

Frequently asked questions

What is the intraclass correlation (ICC), and why does it matter?

The intraclass correlation (ICC) is the correlation between observations in the same cluster; equivalently, the proportion of total variance attributable to clustering. ICC = between-cluster variance / total variance. ICC = 0 means no clustering (all variation within clusters); ICC = 1 means complete clustering (all variation between clusters). ICC > 0.05 typically justifies multilevel analysis. Small ICC (0.01–0.05) means clusters are similar, but clustering still inflates standard errors if ignored. Rules of thumb: ICC > 0.10 strong clustering, 0.05–0.10 moderate, < 0.05 weak. Calculate ICC after fitting unconditional model (no predictors) to assess baseline clustering.

What is the difference between fixed effects and random effects?

Fixed effects are average relationships across clusters (e.g., the average effect of age on outcome across schools). Random effects are cluster-specific deviations from the average (e.g., how each school's age effect differs from the grand mean). A random intercept allows the baseline outcome to differ by cluster (each school has its own intercept). A random slope allows the effect of a predictor to differ by cluster (each school's effect of age differs). Include random effects if clusters differ substantively in the effect; include fixed effects if the effect is conceptually the same across clusters. Random effect variances quantify heterogeneity; large variance indicates effects differ substantially.

How do I choose between REML and ML estimation?

REML (Restricted Maximum Likelihood) is preferred for comparing random effects models (e.g., comparing random slopes models); it produces unbiased variance component estimates. ML (Maximum Likelihood) is preferred for comparing fixed effects (especially when comparing non-nested models) and for likelihood ratio tests of fixed effects. With large samples, REML and ML estimates converge. With small samples and few level 2 clusters, REML is more reliable. Always report which method you used; results can differ, especially with small samples.

What is grand-mean centering vs group-mean centering?

Centering transforms predictors to improve interpretation and numerical stability. Grand-mean centering (subtract overall mean) centers level 1 predictors around the global mean; the intercept represents outcome when the predictor equals the grand mean. Group-mean centering (subtract cluster mean) centers level 1 predictors around each cluster's mean; separates within-cluster and between-cluster effects. For example, centering student-level socioeconomic status (SES) at school mean isolates the within-school effect of SES on achievement; the cluster mean (school-level SES) becomes a level 2 predictor, representing school composition effect. Grand-mean centering is default; group-mean centering used when distinguishing within vs between effects theoretically important.

Related methods

Sources

  1. Bryk, A. S., & Raudenbush, S. W. (1992). Hierarchical Linear Models: Applications and Data Analysis Methods. SAGE Publications.

    Open DOI reference
    Copied.
  2. Goldstein, H. (2011). Multilevel Statistical Models (4th ed.). Wiley-Blackwell.

    Open DOI reference
    Copied.
  3. Shrout, P. E., & Fleiss, J. L. (1979). Intraclass correlations: Uses in assessing rater reliability. Psychological Bulletin, 86(2), 420–428.

    Open DOI reference
    Copied.