Tutorials › Regression Analysis (Undergraduate) › The Main-Effects Omission Pitfall in Interaction Models

Interactions Among Groups · Tutorial 365 of 991

The Main-Effects Omission Pitfall in Interaction Models

Understand the structural restrictions created by omitting main effects from an interaction model, and how to check whether those restrictions are defensible.

Intermediate 9 min read

What You'll Learn

  • Write a group-by-quantitative-predictor interaction model with its corresponding main effects.
  • Translate omitted terms into restrictions on group-specific intercepts and slopes.
  • Compare fitted lines from a full model and a model that omits a group effect.
  • Explain how centering changes the point at which an omitted group effect is constrained to zero.
  • Recognize when an omitted lower-order term could be justified by a genuine scientific constraint.

Why the Terms Belong Together

An interaction allows the relationship between a quantitative predictor and an outcome to differ by group. But an interaction term does not, by itself, give each group a freely varying fitted line. The lower-order terms determine the lines' intercepts and baseline slope; dropping one of them imposes a particular restriction on the fitted structure.

Consider two groups, coded \(G_i=0\) for the reference group and \(G_i=1\) for the other group, and a quantitative predictor \(x_i\). A model with a group-by-predictor interaction and both corresponding main effects is

$$ Y_i=\beta_0+\beta_1x_i+\beta_2G_i+\beta_3x_iG_i+\varepsilon_i. $$

Here \(Y_i\) is the outcome for observation \(i\), and \(\varepsilon_i\) is its error. For the usual linear-model interpretation, assume the errors have mean zero conditional on the predictors, are independent, and have a common variance \(\sigma^2\). These assumptions support standard regression inference; the structural comparisons below follow directly from the equations.

Definition: In this two-group interaction model, the lower-order terms are the intercept, the quantitative predictor \(x_i\), and the group indicator \(G_i\). The product \(x_iG_i\) is the interaction term. Retaining the corresponding lower-order terms means including \(x_i\) and \(G_i\) along with their interaction.

Substituting each group code into the model gives the fitted lines:

$$ G_i=0:\quad E(Y_i\mid x_i,G_i=0)=\beta_0+\beta_1x_i $$
$$ G_i=1:\quad E(Y_i\mid x_i,G_i=1)=(\beta_0+\beta_2)+(\beta_1+\beta_3)x_i. $$

Thus \(\beta_0\) and \(\beta_1\) are the reference group's intercept and slope. The other group's intercept differs by \(\beta_2\), and its slope differs by \(\beta_3\). This group-specific-line representation is the key to seeing what an omitted term does.

What Omitting a Main Effect Constrains

If the group term \(G_i\) is omitted but the interaction is retained, the model becomes \(Y_i=\beta_0+\beta_1x_i+\beta_3x_iG_i+\varepsilon_i\). For \(G_i=0\), the fitted line is \(\beta_0+\beta_1x_i\); for \(G_i=1\), it is \(\beta_0+(\beta_1+\beta_3)x_i\). The groups are forced to have the same fitted outcome at \(x_i=0\), because both lines have intercept \(\beta_0\). Their slopes may still differ.

If instead \(x_i\) is omitted, the model is \(Y_i=\beta_0+\beta_2G_i+\beta_3x_iG_i+\varepsilon_i\). The reference group's fitted line is constant at \(\beta_0\): its slope is forced to zero. The other group's line can have slope \(\beta_3\). Omitting both main effects imposes both restrictions: the reference group is flat, and the two groups have the same fitted outcome at \(x_i=0\).

Key result: In a group-by-quantitative-predictor interaction model, omitting the group main effect forces the groups' fitted lines to coincide at the predictor value coded as zero. Omitting the quantitative-predictor main effect forces the reference group's fitted slope to zero. The full model does not impose either restriction.

These are restrictions on the model's possible fitted values, not merely changes to the wording of a coefficient. Unless a restriction is appropriate, it can prevent the fitted lines from representing the relationship in the data. The interaction term alone does not compensate for a missing main effect.

Worked Example: Reading the Restrictions From the Equations

Suppose \(x\) is a dose measured in milligrams, and group A is coded 0 while group B is coded 1. A fitted model with both main effects is

$$ \widehat{Y}=30+2x+5G+1.5xG. $$

For group A, substitute \(G=0\): \(\widehat{Y}_A=30+2x\). For group B, substitute \(G=1\): \(\widehat{Y}_B=35+3.5x\). At zero milligrams, the fitted outcomes are 30 and 35 units, respectively; the slopes are 2 and 3.5 outcome units per milligram.

Now omit \(G\) but keep \(xG\). The model is \(\widehat{Y}=a+bx+cxG\). Its group A line is \(a+bx\), and its group B line is \(a+(b+c)x\). Both lines predict \(a\) at zero milligrams. This model cannot reproduce the full model's distinct predictions of 30 and 35 at zero dose.

Alternatively, omit \(x\) but keep \(G\) and \(xG\). The group A line is \(\widehat{Y}=a\), with zero change per milligram. Group B's line is \(a+d+cx\), which may slope upward or downward. This model excludes a nonzero dose slope for group A, even if the observed data show one.

A Numerical Illustration of the Fitted Change

The restrictions affect estimates and predictions, not only the set of coefficients in a table. The following hypothetical data have two groups observed at the same three predictor values.

Group\(x\)Observed \(Y\)
A010
A112
A214
B014
B117
B220

Worked Example: Omitting the Group Main Effect

Code group A as \(G=0\) and group B as \(G=1\). The full model fits group A's line \(10+2x\) and group B's line \(14+3x\) exactly. In coefficient form, \(\beta_0=10\), \(\beta_1=2\), \(\beta_2=4\), and \(\beta_3=1\). The two groups differ by 4 outcome units at \(x=0\), and their slopes differ by 1 outcome unit per unit of \(x\).

Fit the reduced model that omits \(G\): \(\widehat{Y}=a+bx+cxG\). It allows separate slopes, \(b\) for A and \(b+c\) for B, but requires a shared intercept \(a\). The least-squares slope for each group can be found from its within-group centered values. For group A, the mean \(x\) is 1 and the mean \(Y\) is 12, so

$$ b=\frac{(-1)(-2)+0(0)+1(2)}{(-1)^2+0^2+1^2} =\frac{4}{2}=2. $$

For group B, the mean \(x\) is 1 and the mean \(Y\) is 17. Its slope is

$$ b+c=\frac{(-1)(-3)+0(0)+1(3)}{(-1)^2+0^2+1^2} =\frac{6}{2}=3, \qquad\text{so }c=1. $$

With these slopes, the intercept each group would have on its own is 12 minus \(2(1)=10\) for A, and 17 minus \(3(1)=14\) for B. The reduced model requires one shared intercept. Because both groups have three observations, least squares sets it to their average: \(a=(10+14)/2=12\). Its fitted lines are therefore \(\widehat{Y}_A=12+2x\) and \(\widehat{Y}_B=12+3x\).

The reduced model has shifted group A's fitted line up by 2 and group B's down by 2 relative to their exact full-model lines. Its residuals are \(-2\) for each A observation and \(2\) for each B observation, giving a residual sum of squares \(6(2^2)=24\), rather than 0 for the full model. The slopes remain different, but the reduced model has forced the fitted group difference to zero at \(x=0\).

The Reference Point and Centering

The restriction created by omitting \(G\) is tied to the point where \(x=0\). If \(x\) is recentered, zero refers to a different predictor value, so the same omission imposes equality there instead. Centering can make an intercept or group difference more interpretable, but it does not remove the restriction created by omitting the group term.

Worked Example: Omission After Centering

Suppose \(x\) is study time in hours, and group A and group B have fitted lines

$$ \widehat{Y}_A=20+1.5x,\qquad \widehat{Y}_B=26+2x. $$

The difference between the lines at \(x=4\) hours is \((26+2(4))-(20+1.5(4))=34-26=8\) outcome units. Now center the predictor at 4 hours by defining \(z=x-4\). Then \(x=z+4\), so the same lines become

$$ \widehat{Y}_A=26+1.5z,\qquad \widehat{Y}_B=34+2z. $$

If the group main effect is omitted from a model using \(z\), the fitted lines must agree at \(z=0\), which is \(x=4\) hours. But the specified lines differ by 8 units there. Thus centering changes where the equality restriction applies; it does not make that restriction disappear.

A Short Justification and a Practical Rule

The model's fitted structure follows simply by substituting the group codes. With both main effects included, setting \(G=0\) removes the group terms and leaves the reference line. Setting \(G=1\) adds \(\beta_2\) to the intercept and \(\beta_3\) to the slope. If \(\beta_2G\) is removed, both substituted equations have the same intercept. If \(\beta_1x\) is removed, the \(G=0\) equation has no \(x\) term and therefore has slope zero. This establishes exactly which structures each omission rules out.

For that reason, a common model-building principle is to retain lower-order terms whenever their interaction is included. This is sometimes called the hierarchy principle. It is a useful default, not an unbreakable algebraic law: an omission can be defensible when the corresponding restriction is genuinely part of the scientific model or design. For example, if theory requires the two groups to have equal expected outcomes at a meaningful zero point, omitting the group term may encode that claim. The restriction should be stated and justified, rather than treated as harmless simplification.

1
Write the full interaction model.
Include the quantitative predictor, the group term, and their product.
2
Expand by group.
Substitute each group code to identify the fitted intercept and slope for every group.
3
Translate any omission into a constraint.
Check whether it forces equal fitted outcomes at the zero point or a zero slope for the reference group.
4
Justify the constraint before fitting the reduced model.
If the restriction is not scientifically intended, retain the lower-order term.

For more than two groups, the same idea applies: a group-by-predictor interaction should ordinarily be accompanied by the group terms and the predictor term. The group terms allow group-specific intercept differences, while the predictor term supplies the reference slope under reference coding. Other contrast codings express these same model dimensions with different coefficient meanings; the important question is whether the model permits the intended group-specific lines.

Common Mistake

A frequent error is to argue, “The interaction is in the model, so the groups can differ; the main effect is unnecessary.” This confuses permission to have different slopes with permission to have different intercepts. When the group term is omitted, the lines can have different slopes but must meet at the predictor value coded zero. Likewise, an interaction term does not allow a nonzero reference-group slope if the predictor term is omitted.

Another mistake is to assume a large or statistically significant interaction makes the omitted term irrelevant. The interaction coefficient describes a slope difference within the specified model; it does not undo the constraints imposed by missing terms. Check the group-specific equations and the predictor value at which any equality is being imposed before interpreting the fit.

Key takeaway: An interaction does not replace its lower-order terms. In the usual group-by-quantitative-predictor model, retain both main effects unless there is a clear reason to impose the restrictions that their omission creates.

Check Your Understanding

Answer each question by writing or interpreting the group-specific fitted lines.

  1. In \(Y=\beta_0+\beta_1x+\beta_2G+\beta_3xG+\varepsilon\), what are the intercept and slope for the group coded \(G=1\)?
  2. What restriction on the fitted lines is imposed by omitting \(G\) while retaining \(x\) and \(xG\)?
  3. What restriction on the reference group's fitted line is imposed by omitting \(x\) while retaining \(G\) and \(xG\)?
  4. If \(x\) is centered at 10 units, at what original predictor value do lines in a model omitting \(G\) have to agree?
  5. Give one circumstance in which omitting a lower-order term could be appropriate, and state the restriction it imposes.