- Introduced by
- Stephen Raudenbush and Anthony Bryk (HLM); extended to multilevel SEM by Bengt Muthen
- Year
- 1980s–1990s (Raudenbush & Bryk 1986; Muthen 1994)
- Type
- Quantitative confirmatory research design
- Family
- Survey / observational design
What does it do?
Hierarchical model testing research is a quantitative design that evaluates theoretically derived models using data with a nested or clustered structure — for example, students within classrooms, employees within organisations, or patients within hospitals.
It applies hierarchical linear models (HLM) or multilevel structural equation models (ML-SEM) to test whether a proposed set of relationships holds after properly accounting for the non-independence introduced by grouping.
The intuition behind the method
When your data come from groups (schools, clinics, firms), observations within the same group tend to resemble each other more than observations from different groups. Ignoring this structure inflates Type I error because standard errors are understated. Hierarchical model testing treats the grouping as a deliberate feature: it simultaneously estimates within-group and between-group relationships, then tests whether a specific theoretical model fits the data at each level. Think of it as running a confirmatory analysis on two (or more) interlinked floors of data at once.
History
The statistical framework for hierarchical linear models is closely associated with Raudenbush and Bryk, whose 2002 textbook is cited on this page as a standard reference. Multilevel structural equation models extend the same logic to latent variables, allowing latent-variable model testing within a multilevel framework.
When to use it
Use hierarchical model testing when observations are naturally nested within groups, the ICC is non-trivial (0.05 is the working convention here), and the goal is to test a specified theoretical model rather than to describe patterns or search for paths. It suits education (students in classrooms), organisational research (employees in teams), and clinical research (patients in hospitals). Avoid it when the data are not clustered, when the number of Level-2 groups is small (about 20 is a rough minimum for random-intercept models; substantially more, commonly 30–50 or more, is advisable for random slopes and cross-level interactions; with only 10–15 groups, fixed-effects alternatives or an explicit acknowledgement of the limitation are preferable), or when the question is exploratory. For non-nested data, standard regression or SEM is more appropriate.
Limitations and considerations
- Requires adequate sample sizes at both levels; too few Level-2 units (groups) yield unstable variance-component estimates and may produce convergence failures.
- Model specification demands a clear prior theory; exploratory use of HLM to search for significant paths inflates Type I error and is methodologically inappropriate.
- Estimation (especially FIML and ML-SEM) is computationally intensive and requires specialised software (HLM, Mplus, R lme4/nlme, Stata).
- Results can be difficult to communicate to audiences unfamiliar with multilevel logic, particularly the distinction between fixed and random effects.
- The method assumes normally distributed random effects and correct specification at both levels. Misspecified Level-1 or Level-2 equations distort the estimates on which the test depends, and very few Level-1 observations per group make random-slope estimates unstable.
- Standard ML and FIML estimates assume that missing data are missing at random (MAR). When this is doubtful, examine the missing-data mechanism and address it before interpreting model comparisons.
Source conditions do not replace independent scientific review or validation by an analysis engine.
Strengths
- Properly accounts for non-independence in clustered data, avoiding the inflated Type I error rates that arise when nested samples are analysed with single-level models.
- Enables simultaneous testing of within-group and between-group theoretical relationships in a single model.
- Supports investigation of cross-level interactions, showing how group context moderates individual-level relationships.
- Flexible across outcome types: continuous, ordinal, and count outcomes can be modelled with appropriate link functions.
- Sequential model comparison makes the retention of each added path an explicit, testable decision rather than a matter of judgement, provided the comparisons use the correct estimation method (see pitfalls).
Applications
- Testing whether a motivational model linking self-efficacy and academic achievement holds across classrooms with different teaching practices.
- Evaluating whether an organisational commitment model generalises across business units with varying leadership styles.
- Assessing the fit of a health behaviour model in patients nested within different clinical settings or geographic regions.
- Examining whether intervention effects on student outcomes vary systematically across schools with different resource levels.
- Testing multilevel mediation models where an individual-level mediator partly explains a school-level effect on outcomes.
How it works
How it works
The researcher translates the theoretical model into a formal multilevel specification: a Level-1 equation describes within-group relationships (e.g., individual predictors of an outcome), and a Level-2 equation models how those relationships vary across groups (e.g., school-level moderators). This step requires explicit theoretical justification for every path and cross-level interaction included.
The dataset is structured so that lower-level units (individuals) are nested inside higher-level units (groups). The intraclass correlation (ICC), calculated from the unconditional model, quantifies the proportion of total variance attributable to the grouping. A non-trivial ICC supports the hierarchical approach; 0.05 is used here as a working convention, not a formal test. Because even a modest ICC can matter when clusters are large, report the ICC together with the mean cluster size rather than relying on the ICC alone. A small ICC does not by itself justify a single-level model.
Model parameters are estimated by restricted maximum likelihood (REML) when the focus is on variance components, or by maximum likelihood (ML) when models that differ in their fixed effects will be compared (see compare). Full information maximum likelihood (FIML) is the usual choice in multilevel SEM. Fixed effects capture average relationships across all groups; random effects capture how much those relationships vary from group to group. Estimation typically proceeds from an unconditional (null) model to progressively more complex models.
A sequence of nested models is compared using likelihood ratio tests (chi-square difference tests), AIC, BIC, or fit indices (CFI, RMSEA, SRMR for ML-SEM). Likelihood ratio tests comparing models that differ in their fixed effects must be fitted with ML, because REML likelihoods are not comparable across different fixed-effect structures. REML is appropriate only when the models differ solely in their random effects (see pitfalls). Each added parameter must improve fit significantly to be retained. This model-comparison logic is the defining step that distinguishes model testing from descriptive reporting.
Fixed-effect estimates and their confidence intervals are reported alongside variance components (random-effect variances and covariances) and their confidence intervals. The conditional ICC, the share of residual variance lying between groups after covariates are included, shows how much grouping remains to be explained. Cross-level interactions, if included, are interpreted as evidence that a group-level variable moderates a within-group relationship. Pseudo-R2 at each level quantifies the reduction in variance relative to a comparison model, such as the unconditional model; because it is not a standard R2, state the definition used. To judge whether random-slope variance is practically meaningful, examine the expected range of slopes across groups implied by the fixed slope and the random-slope standard deviation, not only the statistical significance of the variance.
Common pitfalls
- Ignoring the ICC: running ordinary regression on nested data when the ICC is non-trivial produces standard errors that are too small and significance tests that are unreliable; always compute the null-model ICC first.
- Too few Level-2 units: with few groups, variance-component estimates become unreliable. Rough guidance is about 20 groups for simple random-intercept models and substantially more (commonly 30–50 or more) when testing random slopes or cross-level interactions. With only 10–15 groups, fixed-effects alternatives or an explicit acknowledgement of the limitation are preferable.
- Treating model testing as model building: adding predictors post hoc to improve fit is capitalising on chance; every path in the final model must be theory-driven and specified before seeing the data.
- Misinterpreting random effects: a significant random slope does not mean the relationship differs across all groups. Report the random-slope variance with its confidence interval and the expected range of slopes across groups to assess practical relevance.
- Comparing fixed effects with REML: likelihood-ratio tests for models that differ in their fixed effects should be fitted with maximum likelihood (ML), because REML likelihoods are not comparable across different fixed-effect structures. REML is appropriate for comparing models that differ only in their random effects.
- Centering for cross-level interactions: centering predictors on the grand mean or on the group mean changes the meaning of within-group and between-group coefficients. Choose the centering deliberately, state it in the write-up, and check that the cross-level interpretation matches the theory.
Frequently asked questions
What is the minimum number of groups needed for hierarchical model testing?
There is no fixed minimum. As rough guidance, about 20 Level-2 units is a reasonable lower bound for simple random-intercept models, and substantially more (commonly 30–50 or more) is advisable when testing random slopes or cross-level interactions. With fewer groups, variance-component estimates are unstable and confidence intervals are unreliable. If only 10–15 groups are available, consider fixed-effects models or state the limitation explicitly.
How is hierarchical model testing different from ordinary regression with group dummies?
Including group dummy variables (fixed-effects regression) controls for group mean differences but cannot model variance in slopes across groups or estimate cross-level interactions. Hierarchical models treat groups as a random sample from a broader population of groups, estimate how much relationships vary across groups, and allow group-level predictors to explain that variation, which dummy-variable regression cannot do.
Which fit indices should I report for hierarchical SEM?
Report several indices rather than relying on one. Common rules of thumb for multilevel SEM are CFI above 0.95, RMSEA below 0.06, and SRMR below 0.08 at both the within-level and between-level. These are conventions that vary with model and sample size, not pass/fail tests, so also inspect local fit, such as residual covariances. For nested model comparisons, report the chi-square difference test or the change in BIC. For HLM without a structural component, likelihood ratio tests and AIC/BIC are the primary comparison tools.
Can hierarchical model testing be used with longitudinal data?
Yes. Repeated observations nested within individuals is a common application. This is the three-level case (time points within individuals within groups) or the two-level growth-curve model. The same logic applies: specify the within-person change model at Level 1 and individual-difference predictors at Level 2, then test whether the growth model fits the data.
What software runs hierarchical model testing?
HLM is the dedicated tool for hierarchical linear models. The R packages lme4 and nlme are widely used for multilevel models, and lavaan is an R package that uses its own model syntax rather than Mplus syntax. Mplus handles both HLM and multilevel SEM in a unified framework. Stata (xtmixed/mixed), SAS (PROC MIXED), and SPSS (MIXED procedure) also support multilevel models, though with fewer options for multilevel SEM.
Related methods
Sources
Raudenbush, S. W., & Bryk, A. S. (2002). Hierarchical Linear Models: Applications and Data Analysis Methods (2nd ed.). Sage.
ISBN: 978-0761919049Hox, J. J. (2010). Multilevel Analysis: Techniques and Applications (2nd ed.). Routledge.
ISBN: 978-1848728462