Hierarchical regression adds predictors in planned blocks and shows how much each block improves the model. This guide explains when the approach helps, how to read the change in R-squared, and how to run it in AnalyZ Solutions.
Hierarchical regression is a way of building a regression model in planned steps. Instead of adding every predictor at once, you add them in groups, called blocks, and check after each block how much more of the outcome the model explains.
It builds on multiple regression, which describes how a numeric outcome, such as a test score, relates to several factors at the same time. If that is new, the linear regression guide explains it from the start. The new idea here is the order. Each block is judged by what it adds to the blocks that came before.
Suppose you have exam scores for 250 students. You want to know three things. How much of the difference in scores can background alone explain, such as age and gender? Do study habits, meaning weekly study hours and attendance, explain more once background is accounted for? And does taking part in a tutoring scheme add anything beyond all of that? Hierarchical regression answers these in order. Background goes in first, study habits second, and tutoring last.
A single model with every predictor gives the effect of each variable among people who are the same on all the others. It cannot tell you what a whole group of variables adds beyond what you already knew, and it ignores a sequence you chose in advance. A planned order lets you ask questions such as whether tutoring matters once background and study habits are allowed for.
Use it when your research question has a natural sequence. Common patterns include controlling for demographics first and then testing the variable of interest, testing whether attending a course explains outcomes beyond background characteristics, and comparing the contribution of conceptually distinct groups of predictors such as individual, family, and community factors.
The order of blocks is a research decision that should come from theory or from your analysis plan, and never from what produces the most impressive result. It affects the story: a variable entered last is judged by what it adds after everything else, while one entered first receives credit for any overlap with later variables.
For a single-step model, use linear regression. For clustered data, use multilevel regression.
Hierarchical regression rests on three ideas: how much of the variation a model explains, what a block is, and what it means for a block to add something.
Exam scores differ from student to student. R-squared is the share of those differences that the predictors account for, from 0% to 100%. A value of 0% means the predictors explain nothing, and 100% means they explain everything. Scores are never fully predictable, so real models land well below 100%.
Total variation is how far the scores spread around their average. Unexplained variation is how far they still spread around the model's predictions.
A block is a group of predictors entered together because they belong together conceptually, such as background characteristics, study habits, or a programme or treatment. You choose the blocks and their order before looking at the results, from theory or from your analysis plan.
Each step fits a regression that contains every predictor entered so far. Because the earlier predictors stay in the model, R-squared can only rise or stay the same when a block is added. The size of the rise is the change in R-squared, and it is the contribution of the new block over and above everything before it. In the example, background alone explains about 5% of the variation in exam scores. Adding study habits lifts that to about 30%, and adding tutoring lifts it to about 33%.
The order matters for the story. A block entered first gets credit for any overlap with later blocks, while a block entered last is judged only by what it adds after the others. The next section writes the model in symbols and shows how to test whether a block's contribution is more than chance.
Each block produces an ordinary linear regression that contains all the predictors entered so far. Block 1 contains the first set. Block 2 contains the first and second sets. Block 3 contains all three, and so on.
Each model is fitted by least squares, exactly as in linear regression. What is special is the comparison between neighbouring models. Because the earlier predictors are still in the model, R² can only rise or stay the same, and the rise is the contribution of the new block over and above what came before.
The F test in each row of the module's block summary tests the whole model against a model with no predictors. It does not test the step from one block to the next. That step can be tested with an F test for the change in R²:
Here k is the total number of predictors in the larger model. The result is compared with an F curve with those two degrees of freedom. Spreadsheet programs give the p-value with their F-distribution function.
For the exam-score example in the results below, with n = 250:
| Step | Added | R² before | R² after | Change | F change | df | p-value |
|---|---|---|---|---|---|---|---|
| Block 1 to 2 | Study hours, Attendance | 0.0535 | 0.2975 | 0.2440 | 42.55 | 2, 245 | < 0.001 |
| Block 2 to 3 | Tutoring | 0.2975 | 0.3331 | 0.0355 | 13.00 | 1, 244 | < 0.001 |
Block 2 adds 0.244 to R² with 2 predictors, giving F = ((0.2975 - 0.0535) ÷ 2) ÷ ((1 - 0.2975) ÷ 245) = 42.55. Block 3 adds 0.036 with 1 predictor, giving F = 13.00. Both steps are significant, so each block improves the model beyond chance. The module does not print these values, so calculate them from the R² column when you need to report them.
Adjusted R² is the better figure for comparing blocks, because it drops when a block adds predictors that explain little.
A summary table has one row per block. It shows the variables added at that step, the R-squared of the model at that point, the adjusted R-squared, the change in R-squared relative to the previous block, the F test for the model at that step with its significance level, AIC, and the number of cases.
The change in R-squared is the headline number. If the first block explains 12% of the variation and the second brings the total to 21%, the second block adds 9 percentage points. Whether that is worthwhile depends on your field, but a change of 1 or 2 points from a block of several variables is usually not substantial.
Each block also has its own coefficient table, showing every predictor in the model at that step. Watching how a coefficient changes between blocks is informative. If the effect of taking part in a course shrinks sharply once income enters, part of what looked like a course effect was really an income difference.
The F test in the summary refers to the model at that step as a whole, and does not test whether the increase from the previous block is itself significant. To judge what a block adds, look at the change in R-squared alongside the significance of the newly added predictors in that block's coefficient table. If none of the new predictors is significant and R-squared barely moves, the block adds little. You can also calculate the F change test described in the model section.
Open Inferential Analysis, choose Regression, then Hierarchical Regression.
The sample for each block uses cases with complete data on every variable entered so far. If a variable added in a later block has many missing values, the number of cases falls, and changes in R-squared then partly reflect a different sample. Check the case count for each block in the summary.
The figures below are invented to show the steps, and they follow the results tables in AnalyZ Solutions, with a few columns left out to save space. Suppose exam scores for 250 students are modelled in three blocks: background characteristics first, then study habits, then participation in a tutoring scheme.
| Block | Variables added | R² | Adj R² | ΔR² | F | F p-value | AIC |
|---|---|---|---|---|---|---|---|
| 1 | Age, Gender (Female) | 0.0535 | 0.0458 | 0.0535 | 6.98 | 0.0011 | 1865.60 |
| 2 | Weekly study hours, Attendance rate | 0.2975 | 0.2860 | 0.2440 | 25.94 | < 0.001 | 1795.06 |
| 3 | Tutoring | 0.3331 | 0.3194 | 0.0355 | 24.37 | < 0.001 | 1784.08 |
Background characteristics explained little of the variation in exam scores. Study habits explained a great deal more, and tutoring added a small but clear amount on top. Attending tutoring was associated with about 4 more points after all other variables were accounted for. The block order came from the analysis plan, and it does not show that earlier variables cause later ones.
Reading the order as a causal order. Blocks organise the analysis. They do not prove that earlier variables cause later ones.
Ignoring changing sample sizes. Compare the case counts across blocks.
Overinterpreting small increases. With many predictors, R-squared always creeps up. Check adjusted R-squared and the significance of the new predictors.
Entering too many blocks. Two to four blocks with a clear rationale are easier to defend and explain than many small steps.
Open Regression in AnalyZ Solutions. Free to sign up, free to analyze.
Get started