Statistics & Analysis
Hierarchical Model
Definition
A hierarchical model, also called a multilevel model, is a statistical framework designed to handle data organized at multiple nested levels, such as patients within hospitals, students within schools, or repeated measurements within individuals. It estimates parameters at each level simultaneously, accounting for the fact that observations sharing a group tend to be more alike than observations drawn from different groups.
Why it matters
In many areas of research, data naturally cluster into groups. Patients treated at the same hospital share institutional practices; students in the same classroom share a teacher. When analysts ignore this clustering and apply ordinary regression, the resulting standard errors are usually too small, which inflates the risk of declaring effects significant when they are not. Hierarchical models correct this problem by partitioning variance into within group and between group components. They are widely used in education research, health services research, multicenter clinical trials, and organizational psychology, and reviewers may ask researchers to justify why they did or did not use a hierarchical model when nested data are present.
How it works
A hierarchical model specifies a separate regression equation at each level of the data structure. In a two level example with students nested in schools, the Level 1 equation models student outcomes as a function of student characteristics such as socioeconomic status and prior achievement. The intercept and slope from Level 1 then become outcome variables at Level 2, where school characteristics such as funding per student or teacher experience serve as predictors. This structure allows each school to have its own baseline (a random intercept) and, optionally, its own relationship between predictors and outcomes (a random slope).
In the frequentist framework, the model is typically estimated using restricted maximum likelihood (REML) or full maximum likelihood (ML). REML provides less biased estimates of variance components, while ML is preferred when comparing models with different fixed effects. Before fitting the model, researchers calculate the intraclass correlation coefficient (ICC) to determine how much of the total variance sits at the group level. An ICC near zero suggests little clustering, but the ICC alone does not settle whether clustering matters: its impact also depends on group size, through the design effect, 1 plus (m minus 1) times the ICC, where m is the average group size. With an ICC of 0.05 and 50 observations per group, for example, the design effect is 3.45, so rules of thumb based on the ICC alone, such as an ICC of 0.10 or higher, can mislead.
Hierarchical models estimate each group's effect by partial pooling. In a simple random intercept model with no predictors, a group's estimate is a weighted average of its own observed mean and the overall mean, with a weight of n times the ICC divided by (1 plus (n minus 1) times the ICC) on its own mean, where n is the group's size. Small groups and low ICCs give small weights, so those groups' estimates are pulled (shrunk) strongly toward the overall mean, while large groups keep estimates close to their own means. This borrowing of strength stabilizes estimates for small groups, and it is why a hierarchical model's group estimates differ both from separate analyses of each group (no pooling) and from a single level regression that ignores the groups (complete pooling). The same structure underlies Bayesian hierarchical models, which place prior distributions on the overall mean and the between group variance (the hyperparameters) and estimate all levels jointly, for example by Markov chain Monte Carlo.
A critical practical consideration is the number of groups at the higher level. Reliable variance estimates at Level 2 generally require at least 20 to 30 groups. With fewer groups, the between group variance estimates become unstable, and alternative approaches such as fixed effects for groups, or generalized estimating equations with a small sample correction (GEE also needs many clusters), may be more appropriate. Three level models (for example, measurements within patients within hospitals) follow the same logic but require even more groups at the highest level.
When to use it
Use a hierarchical model whenever your data have a nested or clustered structure and you want to draw inferences about both the individual level and the group level simultaneously. This includes multicenter trials, longitudinal studies with repeated measures, educational assessments, and survey data collected through stratified or cluster sampling designs. Do not use a hierarchical model when clustering is negligible (an ICC near zero and a design effect close to 1), when the number of higher level units is very small (fewer than 10 to 15 groups), or when your research question concerns only individual level effects and you can address clustering through simpler adjustments such as cluster adjusted standard errors.
Key takeaways
- In many areas of research, data naturally cluster into groups.
- In a two level example with students nested in schools, the Level 1 equation models student outcomes as a function of student characteristics such as socioeconomic status and prior achievement.
- Use a hierarchical model whenever your data have a nested or clustered structure and you want to draw inferences about both the individual level and the group level simultaneously.
- One frequent error is ignoring the nested structure entirely, running a single level regression that treats all observations as independent.
Common mistakes
One frequent error is ignoring the nested structure entirely, running a single level regression that treats all observations as independent. This usually leads to artificially narrow confidence intervals and inflated significance. A second mistake is fitting a hierarchical model with too few groups at the upper level, producing variance estimates that are unreliable and sometimes converge to zero. Researchers also sometimes include random slopes for every predictor without theoretical justification, leading to overly complex models that fail to converge. Finally, some analysts misinterpret the ICC as the "effect" of the grouping variable rather than understanding it as the proportion of variance attributable to group membership.
Example
A health services researcher analyzes 30 day readmission rates for 50,000 patients discharged from 120 hospitals. The two level model, a multilevel logistic regression because readmission is binary, includes patient level predictors (age, comorbidity count, insurance type) at Level 1 and hospital level predictors (teaching status, nurse to patient ratio, bed count) at Level 2. The ICC, calculated on the latent (logistic) scale, is 0.12, indicating that 12% of the variation in the underlying propensity for readmission lies between hospitals. After fitting the model, the researcher finds that nurse to patient ratio at Level 2 significantly predicts readmission, even after controlling for patient characteristics.
Sources
- [1]Field A. Discovering Statistics Using IBM SPSS Statistics. 6th ed. SAGE Publications, 2024.
- [2]Gelman A, Hill J. Data Analysis Using Regression and Multilevel/Hierarchical Models. Cambridge: Cambridge University Press; 2007.
- [3]Hox JJ, Moerbeek M, van de Schoot R. Multilevel Analysis: Techniques and Applications. 3rd ed. Routledge, 2017.
Cite this term
Hierarchical Model. Paperguide Research Glossary. Paperguide, 2026. Available at: https://paperguide.ai/research-glossary/hierarchical-model/(Paperguide, 2026)