Tutorials › Regression Analysis (Undergraduate) › Preserve Lower-Order Terms With the Hierarchy Principle

Quantitative Predictor Interactions · Tutorial 329 of 991

Preserve Lower-Order Terms With the Hierarchy Principle

Understand the hierarchy principle, compare its predictions with a reduced product-only model, and see why retaining main effects makes an interaction specification less dependent on arbitrary predictor origins.

Intermediate 9 min read

What You'll Learn

  • Define the hierarchy principle for an interaction between two quantitative predictors.
  • Distinguish a hierarchical interaction model from a product-only model.
  • Calculate and compare predictions from both specifications.
  • Show how changing predictor origins changes the terms in an interaction model.
  • Explain the restrictions imposed when main effects are omitted.
  • Identify when omitting a lower-order term would need a specific justification.

Why Keep the Main Effects?

An interaction model lets the relationship between one quantitative predictor and the outcome depend on another predictor. Its product term is not usually intended to stand alone. If a model includes the product of two predictors, it ordinarily also includes each predictor's main effect. This convention is called the hierarchy principle.

The reason is not that algebra makes a product-only model impossible. It is that omitting the main effects imposes additional restrictions on predicted outcomes, and those restrictions can depend on where the predictors' zero values happen to be. Keeping the lower-order terms makes the specification more flexible and preserves its form when the predictors are shifted to new origins.

Definition: For an interaction term \(x_1x_2\), the corresponding lower-order terms are the main effects \(x_1\) and \(x_2\), along with the intercept. The strong hierarchy principle says that a model containing \(x_1x_2\) should also contain both \(x_1\) and \(x_2\). This is a model-building convention, not an algebraic law that forbids other specifications.

Two Specifications, Different Restrictions

Suppose \(Y_i\) is a quantitative outcome for observation \(i\), and \(x_{1i}\) and \(x_{2i}\) are quantitative predictors. A hierarchical interaction model for the conditional mean is

$$ E(Y_i\mid x_{1i},x_{2i})=\beta_0+\beta_1x_{1i}+\beta_2x_{2i}+\beta_{12}x_{1i}x_{2i}. $$

Here \(\beta_0\) is the intercept, \(\beta_1\) and \(\beta_2\) are the main-effect coefficients, and \(\beta_{12}\) is the product-term coefficient. A product-only specification instead omits both main effects:

$$ E(Y_i\mid x_{1i},x_{2i})=\gamma_0+\gamma_{12}x_{1i}x_{2i}. $$

The product-only model is a more restricted model. In particular, when either predictor is zero, the product is zero, so its predicted mean is \(\gamma_0\), regardless of the other predictor. The hierarchical model does not impose that restriction: when \(x_1=0\), its predicted mean is \(\beta_0+\beta_2x_2\); when \(x_2=0\), it is \(\beta_0+\beta_1x_1\).

These equations describe conditional means. A corresponding regression model can be written as an outcome equal to the specified mean plus an error term \(\varepsilon_i\). The key assumption for interpreting the mean equation is \(E(\varepsilon_i\mid x_{1i},x_{2i})=0\). The predictor values and the chosen equation determine fitted means; the examples below treat the coefficients as given and make no claim about statistical significance or causation.

Worked Example: Compare Predictions at the Predictor Axes

Suppose a hypothetical analysis relates an outcome \(Y\), measured in response units, to two predictors \(x_1\) and \(x_2\). Consider the hierarchical fitted equation

$$ \hat{Y}=10+2x_1+3x_2+0.5x_1x_2. $$

Compare it with the product-only specification \(\hat{Y}=10+0.5x_1x_2\), using the same intercept and product coefficient solely to isolate the effect of omitting the main effects.

At \(x_1=4\) and \(x_2=2\), the hierarchical prediction is

$$ \hat{Y}=10+2(4)+3(2)+0.5(4)(2)=10+8+6+4=28. $$

The product-only prediction at the same predictor values is

$$ \hat{Y}=10+0.5(4)(2)=10+4=14. $$

Now consider \(x_1=0\) and \(x_2=2\). The hierarchical equation gives \(10+2(0)+3(2)+0=16\) response units. The product-only equation gives \(10+0=10\). Its prediction stays at the intercept whenever either predictor is zero, even if the other predictor changes. These differences are consequences of the equations, not evidence that one model fits any particular data better.

Why the Predictor Origins Matter

Zero is not always a scientifically important value. It can be a convenient reference point chosen by how a variable was recorded. For example, a predictor might be measured from an arbitrary baseline, or it might be centered by subtracting a chosen value. A useful model specification should not acquire a different set of required terms merely because the origin has changed.

To see what happens, define shifted predictors \(u=x_1-c\) and \(v=x_2-d\), where \(c\) and \(d\) are constants. Thus \(x_1=u+c\) and \(x_2=v+d\). Substituting these into a hierarchical model gives

$$ \begin{aligned} \beta_0+\beta_1x_1+\beta_2x_2+\beta_{12}x_1x_2 &=\beta_0+\beta_1(u+c)+\beta_2(v+d)+\beta_{12}(u+c)(v+d)\\ &=(\beta_0+\beta_1c+\beta_2d+\beta_{12}cd)\\ &\quad+(\beta_1+\beta_{12}d)u+(\beta_2+\beta_{12}c)v+\beta_{12}uv. \end{aligned} $$

The shifted equation still has an intercept, both main effects, and the interaction. Its coefficients may change, but its form is preserved. The same is not true of a product-only equation: after shifting, its product expands to include terms in \(u\) and \(v\). A product-only restriction therefore depends on the chosen origins.

Worked Example: Centering a Hierarchical Model

Suppose a hypothetical model predicts a plant response, in response units, from two quantitative measurements \(x_1\) and \(x_2\):

$$ \hat{Y}=12+1.5x_1+0.8x_2+0.2x_1x_2. $$

For illustration, shift the predictors by \(c=5\) and \(d=10\), so \(u=x_1-5\) and \(v=x_2-10\). The new intercept is \(12+1.5(5)+0.8(10)+0.2(5)(10)=37.5\). The coefficient of \(u\) is \(1.5+0.2(10)=3.5\), and the coefficient of \(v\) is \(0.8+0.2(5)=1.8\). The product coefficient remains \(0.2\). Thus the centered equation is

$$ \hat{Y}=37.5+3.5u+1.8v+0.2uv. $$

At \(x_1=7\) and \(x_2=12\), the original equation predicts

$$ 12+1.5(7)+0.8(12)+0.2(7)(12)=12+10.5+9.6+16.8=48.9. $$

The shifted values are \(u=2\) and \(v=2\). The centered equation predicts

$$ 37.5+3.5(2)+1.8(2)+0.2(2)(2)=37.5+7+3.6+0.8=48.9. $$

Both equations give the same fitted outcome at the same original predictor values. The main-effect terms remain present after centering, although their coefficients and the intercept change.

What a Product-Only Model Implies After Shifting

The shift calculation also clarifies why a product-only model is a special restriction rather than simply a shorter version of the hierarchical model. Consider \(\hat{Y}=\gamma_0+\gamma_{12}x_1x_2\). Replacing \(x_1\) with \(u+c\) and \(x_2\) with \(v+d\) yields

$$ \hat{Y}=(\gamma_0+\gamma_{12}cd)+\gamma_{12}d\,u+\gamma_{12}c\,v+\gamma_{12}uv. $$

Unless \(c\) and \(d\) happen to make the new main-effect coefficients zero, the shifted equation contains both lower-order terms. Therefore the product-only form at the original origins does not remain product-only at other origins.

Worked Example: A Product-Only Equation Is Not Preserved by Centering

Suppose a hypothetical product-only equation for an outcome in response units is \(\hat{Y}=10+0.5x_1x_2\). Shift the predictors to \(u=x_1-5\) and \(v=x_2-10\), so that \(x_1=u+5\) and \(x_2=v+10\). Substitution gives

$$ \begin{aligned} \hat{Y} &=10+0.5(u+5)(v+10)\\ &=10+0.5(uv+10u+5v+50)\\ &=35+5u+2.5v+0.5uv. \end{aligned} $$

The centered equation now has a \(u\) main effect with coefficient \(5\) and a \(v\) main effect with coefficient \(2.5\). For example, at \(x_1=5\) and \(x_2=10\), the original equation gives \(10+0.5(5)(10)=35\). These predictor values correspond to \(u=v=0\), and the centered equation gives \(35+5(0)+2.5(0)+0=35\), as it must. The prediction is unchanged, but the product-only form has not been preserved.

When Might a Lower-Order Term Be Omitted?

The hierarchy principle is a strong default, not an absolute rule. A researcher might omit a main effect for a clearly stated scientific or design reason. But the resulting equation must be interpreted as imposing the corresponding restriction. In a product-only model, for instance, the mean is constrained to be constant in \(x_2\) whenever \(x_1=0\), and constant in \(x_1\) whenever \(x_2=0\). Those conditions should be defensible in context and meaningful at the chosen origins.

A predictor having a small estimated main-effect coefficient is not, by itself, a reason to delete it while retaining the interaction. Removing that term changes the model's predictions and its behavior under shifts of origin. The scientific question, the meaning of zero, and the consequences for the fitted mean all matter.

Key takeaway: When a model includes \(x_1x_2\), ordinarily retain both \(x_1\) and \(x_2\). The hierarchical specification includes the product-only specification as a special case when both main-effect coefficients are zero, but it does not impose those zero restrictions without reason. Keeping the lower-order terms also preserves the model's form when predictor origins are shifted.

Common Mistake

Wrong reasoning: “The interaction term already contains both predictors, so separate main effects would be redundant.” The product \(x_1x_2\) does not generally represent the separate contributions associated with changing either predictor. It equals zero along either predictor's zero value, which forces the product-only prediction to remain at its intercept there.

Correction: Treat the product and main effects as distinct terms with distinct roles in the mean equation. Unless there is a substantive reason to impose the product-only restrictions, include the intercept, both main effects, and the product term. Then interpret the resulting predictions at the predictor values of interest.

Check Your Understanding

Answer each question by referring to the model equations and their restrictions.

  1. Write the hierarchical conditional-mean model for two quantitative predictors \(x_1\) and \(x_2\), including their interaction.
  2. In a product-only model, what does the predicted mean become when \(x_1=0\)? How does that compare with the hierarchical model?
  3. Why can shifting predictor origins turn a product-only specification into an equation with main effects?
  4. A researcher retains \(x_1x_2\) but drops \(x_2\) because its coefficient is small. What is one reason this choice needs justification beyond the coefficient's size?
  5. When is it reasonable to regard the hierarchy principle as a default rather than an absolute rule?