Why Interactions Describe Treatment-Effect Heterogeneity
A treatment can have different effects for people with different characteristics. A linear outcome model represents one particular pattern of this variation: the treatment effect changes linearly with a covariate. The treatment-by-covariate interaction is the coefficient that encodes that change. Interpreting the model therefore requires more than reading off the treatment coefficient; it requires calculating the treatment contrast at the covariate value of interest.
The same model also separates effect modification from differences in outcome levels. For example, one subgroup may have higher average outcomes under either treatment condition, yet the treatment effect may be identical across subgroups. A covariate main effect can represent that baseline difference; it does not, by itself, imply treatment-effect heterogeneity.
The Model and Its Interpretation
Let \(Y\) be an outcome, \(D\) a treatment indicator taking values 0 and 1, and \(X\) a covariate. A linear conditional-mean model with one interaction is
The model makes the conditional mean linear in the included regressors. Its two treatment-specific mean functions are obtained by substituting the treatment value. For control, \(D=0\), so \(E[Y\mid D=0,X=x]=\beta_0+\beta_Xx\). For treatment, \(D=1\), so \(E[Y\mid D=1,X=x]=\beta_0+\beta_D+(\beta_X+\beta_{DX})x\). Subtracting control from treatment gives
Thus \(\beta_D\) is the modeled treatment contrast when \(X=0\), not generally the treatment contrast for every unit. The coefficient \(\beta_{DX}\) is the change in the treatment contrast for a one-unit increase in \(X\). If \(Y\) is measured in points and \(X\) in years, for example, \(\beta_{DX}\) has units of outcome points per year. The covariate coefficient \(\beta_X\) describes the covariate slope in the control group; the slope in the treatment group is \(\beta_X+\beta_{DX}\).
These are conditional mean contrasts. To interpret them as causal effects, additional identification conditions are needed. Let \(Y(1)\) and \(Y(0)\) denote the potential outcomes under treatment and control. Consistency requires that the observed outcome equals the potential outcome corresponding to the treatment received, and no interference requires one unit's treatment not to alter another unit's outcome. Conditional exchangeability, \((Y(1),Y(0))\perp D\mid X\), and positivity, \(0<P(D=1\mid X=x)<1\) for covariate values of interest, allow the observed conditional contrast to identify the conditional average treatment effect. Random assignment can provide exchangeability; in observational data it must be justified by the design and measured covariates. Even with identification, interpreting the linear formula at a value of \(X\) depends on the conditional-mean model being adequate there.
Worked Example: A Continuous Covariate
Suppose a hypothetical randomized program is evaluated using an outcome measured in points. Let \(X\) be age centered at 50 and measured in decades, so \(X=0\) corresponds to age 50, \(X=-1\) to age 40, and \(X=1\) to age 60. A fitted model is
The implied treatment contrast at covariate value \(x\) is
At age 40, \(x=-1\), so \(\widehat{\tau}(-1)=2+1.5(-1)=0.5\) points. At age 50, \(x=0\), so \(\widehat{\tau}(0)=2+1.5(0)=2\) points. At age 60, \(x=1\), so \(\widehat{\tau}(1)=2+1.5(1)=3.5\) points. In this fitted model, the estimated treatment contrast increases by 1.5 points per decade of age.
The model's predicted control mean at age 60 is \(70+3(1)=73\) points, and its predicted treatment mean is \(70+2+3(1)+1.5(1)=76.5\) points. Their difference is \(76.5-73=3.5\) points, matching the contrast formula. Because this example stipulates random assignment, and assumes consistency, no interference, adequate treatment representation at these ages, and a suitable linear conditional-mean model, the contrasts can be given a causal interpretation for the population represented by the experiment. The fitted values alone would not establish those conditions in an actual application.
Binary Covariates and Subgroup Effects
When \(X\) is a binary subgroup indicator, the interaction model yields a separate treatment effect for each group. Let \(X=0\) denote one group and \(X=1\) another. The treatment effect for the \(X=0\) group is \(\beta_D\); for the \(X=1\) group it is \(\beta_D+\beta_{DX}\). The interaction coefficient is therefore the difference between those two treatment effects. The coefficient \(\beta_X\), in contrast, is the difference in conditional mean outcomes between groups among controls.
This distinction matters because a group can differ in its untreated outcome level without differing in its response to treatment. The treatment effect is a within-group treatment-versus-control contrast. A comparison of group outcome levels under just one treatment condition is not that contrast.
Worked Example: Subgroup Differences Versus Effect Modification
In a hypothetical randomized study, let \(X=0\) indicate a rural participant and \(X=1\) an urban participant. The outcome is a score in points. Suppose the fitted conditional-mean model is
For rural participants, \(X=0\). The predicted control mean is \(40+5(0)=40\) points, and the predicted treatment mean is \(40+5(0)+3-2(0)=43\) points. The estimated treatment effect is \(43-40=3\) points, also given by \(3-2(0)=3\).
For urban participants, \(X=1\). The predicted control mean is \(40+5=45\) points, and the predicted treatment mean is \(40+5+3-2=46\) points. The estimated treatment effect is \(46-45=1\) point, also given by \(3-2(1)=1\). The interaction coefficient \(-2\) is the urban-minus-rural difference in treatment effects: \(1-3=-2\) points.
The main-effect coefficient \(5\) says that among controls the urban group's predicted mean is 5 points higher than the rural group's. It does not say that urban participants benefit 5 points more from treatment. In this example the estimated treatment effect is actually 2 points smaller in the urban group. If treatment was randomized and the model and identification conditions are appropriate, these modeled contrasts estimate subgroup causal effects. The numerical contrasts do not alone establish that the difference between subgroup effects is statistically distinguishable from zero.
Centering Changes the Reference Point
The treatment coefficient depends on where zero is placed on the covariate scale. That dependence is a matter of parameterization, not a change in the fitted treatment contrasts. Centering a covariate at a meaningful value often makes the treatment coefficient easier to interpret: it becomes the treatment contrast at that reference value.
To see this, write \(X=X_c+c\), where \(X_c=X-c\) is the covariate centered at \(c\). Substituting into the model and collecting terms gives
The coefficient on \(D\) in the centered model is \(\beta_D+c\beta_{DX}\), which is exactly the original model's treatment contrast at \(X=c\). The interaction coefficient remains the same when this is only a shift of the covariate origin. This algebra assumes the same linear model and regressors are being expressed in a different coordinate system.
Worked Example: Re-centering Without Changing Effects
Consider the hypothetical fitted model \(\widehat{E}[Y\mid D,X]=10+D+3X+2DX\), where \(Y\) is measured in units and \(X\) is measured in hours. The treatment contrast at \(X=x\) is \(1+2x\). Thus at \(X=4\) hours it is \(1+2(4)=9\) units, and at \(X=6\) hours it is \(1+2(6)=13\) units.
Now define \(X_c=X-5\), so that \(X=X_c+5\). Substitution and collection of terms give
In the centered model, the treatment coefficient is 11, the treatment contrast at \(X_c=0\), or 5 hours. At 4 hours, \(X_c=-1\), and the contrast is \(11+2(-1)=9\) units. At 6 hours, \(X_c=1\), and it is \(11+2(1)=13\) units. The reference-point coefficient changed from 1 to 11, but the covariate-specific treatment contrasts did not change.
What the Interaction Does—and Does Not—Assume
A linear interaction is a structured description of heterogeneity, not a guarantee that treatment effects truly vary linearly. With one continuous covariate, it imposes a treatment-effect function of the form \(\beta_D+\beta_{DX}x\). If the real pattern is curved or has thresholds, this model may misrepresent effects at some covariate values. Predictions outside the observed covariate range are particularly dependent on extrapolation and should not be treated as supported simply because the formula produces a number.
With several covariates, a model might include separate treatment interactions with each covariate:
Under this specification, the treatment contrast at a covariate vector \((x_1,\ldots,x_p)\) is \(\beta_D+\sum_{j=1}^{p}\beta_{Dj}x_j\). Each interaction coefficient describes a change in the treatment contrast as its corresponding covariate increases, holding the other included covariates fixed. This particular model does not include interactions among covariates or nonlinear treatment-effect patterns unless they are added explicitly.
A fitted interaction model also does not by itself establish that treatment effects differ reliably across values or groups. Estimation uncertainty matters, and the uncertainty of a covariate-specific contrast involves the uncertainty and covariance of the relevant fitted coefficients. Interpreting a point estimate as a known effect, or inferring a subgroup difference from separate coefficient sizes alone, ignores that uncertainty.
Common Pitfall: Reading the Treatment Main Effect as Universal
A frequent error is to report \(\beta_D\) as “the treatment effect” in an interaction model, regardless of the covariate value. This is only correct at \(X=0\). Another error is to treat \(\beta_X\) as evidence of effect modification. It describes a difference in outcome levels by \(X\) in the control condition; the treatment-by-covariate coefficient, together with the resulting treatment contrasts, describes modeled effect modification.
Identify the treatment indicator, covariate scale, and which treatment-by-covariate terms are included.
Set \(D=1\) and \(D=0\), subtract the predicted means, and simplify as a function of the covariates.
Substitute the specified covariate values, report outcome units, and distinguish a modeled contrast from a justified causal effect.
The main practical value of the interaction parameterization is that it makes the assumed pattern of effect heterogeneity explicit. It also makes the reference point explicit: centering can align that point with a meaningful value, while the covariate-specific contrasts remain the quantities to report when the question concerns effects for particular covariate profiles.
Check Your Understanding
For each question, identify the relevant coefficient or calculate the treatment contrast before interpreting it.
- In \(E[Y\mid D,X]=12+4D+2X-0.5DX\), what is the modeled treatment contrast at \(X=6\), and what are its units if \(Y\) is in dollars and \(X\) is in years?
- For a binary subgroup indicator \(X\), explain what \(\beta_X\) and \(\beta_{DX}\) represent in a model that includes both terms.
- If the covariate is centered at \(c=10\), which covariate value does the treatment coefficient in the centered model refer to?
- Can an interaction coefficient be interpreted as causal effect modification merely because it was estimated by regression? State a condition needed for a causal interpretation.
- Why might reporting a linear interaction model's prediction far outside the observed covariate range be misleading?