Why Test Interactions as a Block?
An interaction allows the relationship between one predictor and the response to vary with another predictor. For example, a regression model might ask whether the association between study time and a test score differs across course formats. If course format has several categories, that question may require several product terms. The relevant question is then whether those terms jointly improve the model, not whether one coefficient happens to stand out in a separate test.
A block test compares two nested models fitted to the same observations. The reduced model contains the terms retained under the null hypothesis; the full model adds the specified interaction terms. The partial F test measures whether the reduction in residual variation from adding the block is large relative to the remaining residual variation in the full model.
Models and Hypotheses
Suppose the reduced model has \(p_R\) coefficients, including the intercept, and the full model has \(p_F\) coefficients. The full model adds \(q=p_F-p_R\) interaction terms. Write the residual sums of squares as \(SSE_R\) for the reduced model and \(SSE_F\) for the full model. Since the full model contains every term in the reduced model, fitting it cannot increase the residual sum of squares: \(SSE_F\leq SSE_R\).
The hypotheses concern the coefficients of the added terms. For example, if the block consists of two interaction coefficients, then \(H_0\) says both are zero; \(H_a\) says at least one is nonzero. The alternative does not say that every interaction coefficient is nonzero.
When testing interactions, retain the corresponding main effects in both models. For example, a model with \(x z\) as an interaction will ordinarily include the main effects for \(x\) and \(z\) as well. With a categorical predictor, indicator variables encode its groups; interactions between a continuous predictor and those indicators allow its slope to differ across groups. The number of restrictions \(q\) is the number of added, linearly independent terms.
The numerator is the average reduction in residual sum of squares per added term. The denominator is the full model’s residual mean square, an estimate of the error variance. A large value of \(F\) indicates that the block accounts for a substantial reduction relative to the remaining residual variation. The p-value is the upper-tail probability \(P(F_{q,n-p_F}\geq F_{\text{observed}})\), calculated under \(H_0\).
Conditions for the Test
The exact partial F reference distribution requires the standard regression model conditions. Conditional on the predictor values, the errors have mean zero, are independent, have a common variance \(\sigma^2\), and follow a normal distribution. The models must use the same response observations, and the full model must have estimable coefficients: its design matrix must have full column rank. Under \(H_0\), the reduced mean structure is adequate for the comparison. Serious departures from these conditions can make the reported p-value unreliable.
The added terms must be specified as a block before calculating the test. A test of two product terms asks one joint question, even if their individual coefficient estimates or standard errors differ. The block’s interpretation also depends on sensible coding of the predictors and on the context of the fitted models.
Why the Partial F Reference Distribution Applies
The test compares two sums of squared residuals. Its reference distribution follows from the way the additional model terms divide variation under the null hypothesis. Let \(P_R\) and \(P_F\) denote the projection matrices for the reduced and full model spaces. Because the models are nested, the reduced model space is contained in the full model space. The difference \(P_F-P_R\) projects onto the \(q\)-dimensional part added by the interaction block.
Under \(H_0\), the mean response lies in the reduced model space. With normal errors of variance \(\sigma^2\), the extra sum of squares divided by \(\sigma^2\) has a chi-square distribution with \(q\) degrees of freedom. The full-model residual sum of squares divided by \(\sigma^2\) has a chi-square distribution with \(n-p_F\) degrees of freedom. These quantities are independent because they correspond to orthogonal projection spaces. Dividing each by its degrees of freedom and taking their ratio gives the stated F distribution.
This justification explains both degrees of freedom: \(q\) counts the independent added restrictions, and \(n-p_F\) is the full model’s residual degrees of freedom. It also shows why the test is an upper-tail test: unusually large reductions in residual sum of squares produce large values of \(F\).
Worked Example: One Continuous-by-Continuous Interaction
Suppose a hypothetical dataset contains \(n=30\) observations. The reduced model predicts response \(y\) from predictors \(x\) and \(z\), while the full model adds their product \(xz\). Assume the models have full rank and use the same observations. Their residual sums of squares are \(SSE_R=480\) and \(SSE_F=408\). Test the interaction at \(\alpha=0.05\).
The reduced model has an intercept and two main-effect coefficients, so \(p_R=3\). The full model adds one interaction coefficient, so \(p_F=4\) and \(q=1\). The hypotheses are \(H_0:\beta_{xz}=0\) versus \(H_a:\beta_{xz}\ne0\). The residual degrees of freedom for the full model are \(30-4=26\).
Substitute the values into the partial F formula:
Thus \(F=4.588\) with \(df=(1,26)\), giving an upper-tail p-value of approximately \(0.042\). Since \(0.042<0.05\), reject \(H_0\). Under the stated model conditions, these data provide evidence that adding the \(xz\) interaction improves the model’s mean structure. This is evidence of an interaction in the specified model; it does not establish a causal effect.
Testing Several Interaction Terms Together
A categorical predictor with more than two groups commonly generates multiple interaction terms. If the question is whether a continuous predictor has a different slope in any group, test all slope-difference terms together. Testing them as a block gives a single result for that question and avoids replacing it with a collection of separate yes-or-no decisions.
Worked Example: Slope Differences Across Three Groups
Consider hypothetical measurements from \(n=48\) units in three course formats. Let \(x\) be study time in hours and \(y\) be a score in points. Using format C as the reference group, the reduced model includes an intercept, \(x\), and indicators for formats A and B. The full model adds \(x\) multiplied by each indicator. Assume both models have full rank, use all 48 units, and meet the regression conditions for the test. The reduced and full residual sums of squares are 920 and 760, respectively.
The two added terms represent the differences between the slopes for formats A and B and the reference slope for format C. Test \(H_0:\beta_{xA}=\beta_{xB}=0\), against the alternative that at least one of these coefficients differs from zero.
The reduced model has four coefficients. The full model has six, so \(q=2\) and the full-model residual degrees of freedom are \(48-6=42\). The calculation is:
For \(F=4.421\) with \(df=(2,42)\), the upper-tail p-value is approximately \(0.018\). At the 5% significance level, reject the joint null hypothesis. The data provide evidence that the study-time slope differs for at least one of formats A or B relative to format C. The block test alone does not identify which group differs, nor does it claim that both slope differences are nonzero.
When the Block Test Is Not Significant
A non-significant result means the observed reduction in residual variation is not sufficiently large, relative to the full-model residual variation, to reject the joint null at the chosen significance level. It does not prove that every interaction is exactly zero. The test may have limited ability to detect modest differences, especially when the sample is small or the residual variation is substantial.
Worked Example: A Block That Does Not Improve the Model Significantly
Suppose a hypothetical regression uses \(n=36\) observations. The reduced model contains an intercept and three predictors, \(x_1,x_2,x_3\). The full model adds the two interactions \(x_1x_2\) and \(x_1x_3\). Assume both models use the same observations, are full rank, and satisfy the conditions for the partial F test. Let \(SSE_R=300\) and \(SSE_F=282\).
There are \(q=2\) added terms. The full model has six coefficients, including the intercept, so its residual degrees of freedom are \(36-6=30\). The joint null hypothesis is that both interaction coefficients are zero. Calculate:
The p-value for \(F=0.9574\) with \(df=(2,30)\) is approximately \(0.395\). Because this exceeds \(0.05\), do not reject the joint null hypothesis. The result does not provide strong evidence that this two-term interaction block improves the specified model at the 5% level. It does not establish that interactions are absent, and it does not rule out useful interactions outside the block that was tested.
Common Mistakes and Practical Interpretation
- Testing coefficients one at a time instead of testing the stated block. Separate coefficient tests ask separate questions. The block test asks whether all specified coefficients are zero jointly and uses the covariance among their estimates through the model comparison.
- Using the wrong denominator degrees of freedom. Use \(n-p_F\), the residual degrees of freedom for the full model, not the reduced model’s residual degrees of freedom.
- Comparing models fitted to different observations. The partial F calculation is a nested-model comparison; both models must use the same response observations.
- Dropping main effects while testing their interaction. An interaction model should ordinarily retain the associated lower-order terms in both models, so the block has the intended meaning.
- Calling a non-significant result proof of no interaction. The appropriate conclusion is that the test did not provide sufficient evidence against the joint null at the chosen \(\alpha\).
A useful report names the added terms, gives the test statistic and both degrees of freedom, reports the p-value, and states the conclusion in the application’s units and context. The test assesses improvement in the fitted mean structure under its assumptions; it does not by itself establish causation or guarantee useful predictions.
Check Your Understanding
Answer each question using the definitions and model comparison above.
- A full model adds three interaction terms to a reduced model. What is the numerator degrees of freedom for the partial F test, and what does its joint null hypothesis state?
- Why must the reduced and full models use the same observations for this comparison?
- A model with two course-format indicators adds two interactions with a continuous predictor. What does rejection of the block null establish, and what does it not establish?
- For a full model with \(n=52\) observations and \(p_F=7\) coefficients, what are the denominator degrees of freedom?
- A block test has p-value \(0.18\) at \(\alpha=0.05\). State an appropriate conclusion without claiming that the interaction terms are absent.