Hierarchical Linear Modeling (HLM / Multilevel Modeling)
Also known as: HLM, MLM, multilevel modeling, multilevel analysis, mixed-effects modeling, Hiyerarşik Doğrusal Modelleme (HLM / MLM)
Hierarchical Linear Modeling (HLM), also known as Multilevel Modeling (MLM), is a parametric statistical method for analyzing nested or clustered data — for example students within classrooms, patients within hospitals, or employees within organizations. Formalized by Raudenbush and Bryk in their 2002 seminal text (building on work from the mid-1980s), HLM simultaneously estimates individual-level and group-level effects while correctly partitioning variance across levels.
Read the full method
Sign in with a free account to read this section.
Method map
The neighbourhood of related methods — select a node to explore.
+1 more
When to use it
Use HLM whenever your data have a nested structure and the intraclass correlation is non-trivial (ICC > 0.05). Common scenarios include educational research (students in schools), clinical studies (patients in clinics or wards), longitudinal designs (repeated measurements nested within individuals), and organizational studies (employees in teams or companies). Assumptions that must hold: the hierarchical structure exists and has at least two levels; groups contain a sufficient number of observations (preferably ≥ 5 per group); random effects are approximately normally distributed; and Level-1 residuals are independent conditional on the random effects. If ICC is near zero, ordinary regression with cluster-robust standard errors may suffice.
Strengths & limitations
- Correctly handles non-independence of observations within groups, preventing inflated Type I error rates.
- Simultaneously estimates effects at multiple levels, enabling cross-level interaction testing.
- Accommodates unbalanced group sizes and missing data more gracefully than repeated-measures ANOVA.
- Partitions variance clearly, providing the ICC as a meaningful index of group influence.
- Requires a sufficient number of groups (ideally ≥ 20–30) for stable random-effect estimates.
- Model specification is complex: wrong choices about fixed vs. random effects can mislead.
- Computationally more demanding than OLS; convergence issues can arise with complex random structures.
- Interpretation of cross-level interactions requires care and strong theoretical grounding.
Frequently asked
How do I know if I need HLM rather than ordinary regression?
Start by estimating the null (intercept-only) model and computing the ICC. An ICC above 0.05 indicates that more than 5% of variance lies between groups, which violates the independence assumption of OLS and justifies HLM. Even lower ICCs can matter when group sizes are large, because the design effect (1 + (n̄−1)×ICC) still inflates standard errors.
How many groups do I need?
The number of Level-2 units (groups) governs the precision of random-effect estimates. A commonly cited minimum is 20–30 groups for reliable variance component estimation, though the required number depends on group size and model complexity. With very few groups (< 10), random-effect estimates are unstable and Bayesian or fixed-effects alternatives should be considered.
What is the difference between a random intercept and a random slope model?
A random intercept model allows each group's baseline level of the outcome to differ, while keeping the relationship between predictors and the outcome the same across groups. A random slope model additionally allows the strength (slope) of that relationship to vary by group. Random slope models are richer but require more data and are harder to estimate; adding them is only warranted when theory or exploratory analysis suggests the effect genuinely varies across groups.
Should I use maximum likelihood (ML) or restricted maximum likelihood (REML)?
Use REML when the primary goal is estimating random-effect variances — it produces less-biased variance components. Use full ML when comparing models that differ in their fixed effects via the likelihood-ratio test, because REML likelihoods are not comparable across models with different fixed parts. Most software defaults to REML for final estimation.
Sources
- Raudenbush, S.W. & Bryk, A.S. (2002). Hierarchical Linear Models: Applications and Data Analysis Methods (2nd ed.). Sage. ISBN: 978-0761919049
- Hox, J.J. (2010). Multilevel Analysis: Techniques and Applications (2nd ed.). Routledge. DOI: 10.4324/9780203852279 ↗
How to cite this page
ScholarGate. (2026, June 1). Hierarchical Linear Modeling (HLM / Multilevel Modeling). ScholarGate. https://scholargate.app/en/statistics/hlm
Which method?
Set this method beside its closest kin and read them side by side — the library lays the books on the table; the choice is yours.
- Mixed Effects ModelStatistics↔ compare
- One-way ANOVAStatistics↔ compare
- Repeated-measures ANOVAStatistics↔ compare
- SEMStatistics↔ compare