Tutorials › Causal Inference › Covariate-Specific IV Effects With Interactions

Linear IV Estimation · Tutorial 534 of 972

Covariate-Specific IV Effects With Interactions

Build an interaction-based 2SLS model to estimate and compare IV effects across two covariate groups, while checking the assumptions needed for causal interpretation.

Intermediate 10 min read

What You'll Learn

  • Specify treatment and treatment–covariate interaction terms in a 2SLS model.
  • Construct the corresponding instrument interactions and identify the included regressors.
  • Interpret the group-specific treatment effects and their difference.
  • Check relevance and causal assumptions within each covariate group.
  • Calculate covariate-specific Wald estimates and a confidence interval for a linear contrast.
  • Distinguish differences in local IV effects from population-wide treatment-effect modification.

Why Interact the Treatment With a Covariate?

A single IV coefficient can conceal meaningful variation. Suppose a binary treatment \(D\) may affect an outcome \(Y\) differently across two groups defined by a binary, pretreatment covariate \(C\). The covariate might be an age-group indicator or a baseline risk category. If the instrument changes treatment receipt in both groups, an interaction model can estimate a separate IV effect for each group rather than imposing one common effect.

The interaction does not make the treatment exogenous. Both the treatment and its interaction with \(C\) may be endogenous, so both require instruments. The central specification rule is to interact the excluded instrument with the same covariate and include that interaction in the instrument set.

Definition: Let \(C\) be a prespecified binary covariate, coded 0 or 1. A covariate-specific IV interaction model includes \(D\) and \(D C\) as endogenous regressors, includes \(C\) and any other exogenous controls as regressors, and uses the excluded instrument \(Z\) and its interaction \(Z C\) as instruments for the two endogenous terms. The treatment effect at \(C=0\) is the coefficient on \(D\); the treatment effect at \(C=1\) is the sum of the coefficients on \(D\) and \(D C\).

Model and Instrument Set

For one binary instrument \(Z\), a linear specification with additional exogenous covariates \(X\) is

$$ Y=\beta_0+\beta_1D+\beta_2C+\beta_3(DC)+X^\top\gamma+\varepsilon. $$

Here \(X\) denotes a vector of included exogenous covariates. The model allows the treatment slope to vary with \(C\), while allowing a different baseline outcome level for the two groups through \(\beta_2 C\). When \(C=0\), the treatment-related term is \(\beta_1D\). When \(C=1\), it is \((\beta_1+\beta_3)D\). Thus \(\beta_3\) is the difference between the two model-based treatment effects.

Because \(D\) is endogenous, \(DC\) is generally endogenous too. The excluded instruments are \(Z\) and \(ZC\). The included exogenous regressors—an intercept, \(C\), and \(X\)—also belong in the instrument set. In other words, the full instrument set consists of the included exogenous regressors together with \(Z\) and \(ZC\). In 2SLS, each endogenous regressor is projected on this full set, and the second stage uses the resulting fitted values along with the included exogenous regressors.

$$ \begin{aligned} D&=\pi_0+\pi_1Z+\pi_2C+\pi_3(ZC)+X^\top\delta+v_D,\\ DC&=\rho_0+\rho_1Z+\rho_2C+\rho_3(ZC)+X^\top\kappa+v_{DC}. \end{aligned} $$

These equations describe the first-stage projections; they are not causal outcome models. In practice, a 2SLS procedure estimates the two projections using the same full instrument set. The interaction \(DC\) must be treated as a separate endogenous regressor. Do not include it in the outcome equation as if it were automatically exogenous merely because \(C\) is exogenous.

Worked Example: Reading the Coefficients

Suppose \(Y\) is a clinical score measured in points, \(D=1\) indicates receiving a treatment, and \(C=1\) denotes a prespecified high-risk group. An interaction model produces \(\hat{\beta}_1=4.0\) and \(\hat{\beta}_3=-1.5\) points, holding included covariates fixed. Assume, for this interpretation, that the IV assumptions and the model’s causal interpretation are justified.

For \(C=0\), the treatment-related part of the fitted outcome is \(\hat{\beta}_1D=4.0D\), so the estimated treatment effect is 4.0 score points.

For \(C=1\), the treatment-related part is \((\hat{\beta}_1+\hat{\beta}_3)D\). Substitution gives \(4.0+(-1.5)=2.5\) points. The estimated effect in the high-risk group is therefore 2.5 score points.

The interaction estimate, \(-1.5\) points, is the estimated difference: the high-risk group’s effect is 1.5 points lower than the \(C=0\) group’s effect. The sign of this contrast does not by itself establish that the difference is statistically distinguishable from zero.

Conditions for Identification and Interpretation

The interaction specification alone does not guarantee that either coefficient is causal. The instrument must be relevant for treatment variation in each covariate group, and the causal assumptions must apply within those groups (or conditionally on the included covariates). In a linear 2SLS formulation, identification requires sufficient independent instrument variation to identify both endogenous regressors after accounting for the included exogenous regressors. A strong first stage overall does not guarantee useful first stages for both \(C=0\) and \(C=1\).

  • Prespecified, pretreatment covariate: \(C\) should describe group membership before the instrument and treatment operate. Conditioning on a variable affected by treatment or the instrument can change the target and introduce bias.
  • Relevance: \(Z\) must shift \(D\) within each \(C\) group, after adjustment for \(X\). Equivalently, the instrument set must provide enough distinct variation to identify both \(D\) and \(DC\).
  • Independence: Conditional on included covariates, instrument assignment must be independent of the relevant potential outcomes and potential treatment values.
  • Exclusion: The instrument must affect \(Y\) only through treatment, including within each covariate group. Allowing \(Z\) to have a direct effect on \(Y\) that differs by \(C\) would invalidate the proposed excluded instrument \(ZC\) as well.
  • Consistency and no interference: Observed outcomes and treatment receipt must correspond to the relevant potential outcomes and treatment values, and one unit’s assignment must not alter another unit’s outcome.

For a binary instrument and treatment, a local average treatment effect interpretation additionally requires monotonicity within each \(C\) group: assignment to \(Z=1\) does not make some units less likely to take treatment while making others more likely. Under these conditions, the group-specific IV effect pertains to compliers in that group, not automatically to every person in that group.

Why the Within-Group Wald Ratios Arise

The logic is clearest when there are no additional \(X\) covariates and the instrument is binary. Within each value \(c\) of \(C\), define the reduced-form difference in mean outcomes and the first-stage difference in treatment rates:

$$ \Delta_Y(c)=E[Y\mid Z=1,C=c]-E[Y\mid Z=0,C=c], \qquad \Delta_D(c)=E[D\mid Z=1,C=c]-E[D\mid Z=0,C=c]. $$

Under random or conditionally independent instrument assignment and exclusion, the outcome difference is generated by the treatment changes induced by the instrument. If the group-specific linear treatment effect is constant, this gives \(\Delta_Y(c)=\beta(c)\Delta_D(c)\). Provided \(\Delta_D(c)\ne 0\), division yields the group-specific Wald ratio.

$$ \beta(c)=\frac{\Delta_Y(c)}{\Delta_D(c)},\qquad \beta(0)=\beta_1,\qquad \beta(1)=\beta_1+\beta_3. $$

With heterogeneous individual effects, the ratio need not be a population average treatment effect. To see the local interpretation, write \(D(z)\) for a unit’s potential treatment under instrument value \(z\), and \(Y(d)\) for its potential outcome under treatment value \(d\). Under independence and exclusion, the outcome difference in group \(c\) can be written as

$$ E\!\left[(Y(1)-Y(0))(D(1)-D(0))\mid C=c\right]. $$

The first-stage difference is \(E[D(1)-D(0)\mid C=c]\). With binary treatment and monotonicity, \(D(1)-D(0)\) is 1 for compliers and 0 for always-takers and never-takers. Dividing the outcome difference by the first-stage difference therefore gives the mean treatment effect among compliers in group \(c\), when that group has compliers. The two groups’ complier populations can differ. Consequently, \(\beta_3\) may compare local effects for different populations; it is not necessarily a causal effect of changing \(C\), nor a difference in effects for the same individuals.

Worked Example: Calculating Two Group-Specific Wald Estimates

Consider hypothetical data from an instrument randomized within each covariate group. The outcome is a clinical score in points, and the table gives group means for treatment receipt and outcome. Assume consistency, no interference, instrument independence and exclusion within each group, and monotonicity. Also assume the first-stage differences shown are nonzero.

Covariate groupInstrument \(Z\)Mean treatment rateMean score (points)
\(C=0\)00.2010.0
\(C=0\)10.5012.4
\(C=1\)00.2515.0
\(C=1\)10.4516.2

For \(C=0\), the first-stage difference is \(0.50-0.20=0.30\), and the reduced-form difference is \(12.4-10.0=2.4\) points. Thus

$$ \hat{\beta}(0)=\frac{2.4\text{ points}}{0.30}=8.0\text{ points per treatment}. $$

For \(C=1\), the corresponding differences are \(0.45-0.25=0.20\) and \(16.2-15.0=1.2\) points. Therefore

$$ \hat{\beta}(1)=\frac{1.2\text{ points}}{0.20}=6.0\text{ points per treatment}. $$

The interaction contrast is \(6.0-8.0=-2.0\) points. In this hypothetical illustration, the estimated local IV effect is 2 points lower for compliers in the \(C=1\) group than for compliers in the \(C=0\) group. These cell-mean calculations do not establish the assumptions; those must be justified by the study design and subject-matter knowledge.

Inference for Group Effects and Their Difference

Inference should match the sampling design and error structure, using an appropriate 2SLS standard error. The effect at \(C=1\) is a linear combination of estimated coefficients, so its standard error must account for their covariance. It is generally incorrect to use only the standard error of \(\hat{\beta}_1\) for the \(C=1\) effect. Likewise, the interaction coefficient directly tests the difference between the two fitted group effects.

For estimates \(\hat{\beta}_1\) and \(\hat{\beta}_3\), the estimated variance of the \(C=1\) effect is

$$ \widehat{\operatorname{Var}}(\hat{\beta}_1+\hat{\beta}_3) =\widehat{\operatorname{Var}}(\hat{\beta}_1) +\widehat{\operatorname{Var}}(\hat{\beta}_3) +2\widehat{\operatorname{Cov}}(\hat{\beta}_1,\hat{\beta}_3). $$

Worked Example: Uncertainty for the \(C=1\) Effect

Suppose a hypothetical 2SLS analysis estimates \(\hat{\beta}_1=8.0\) and \(\hat{\beta}_3=-2.0\) points. Its reported covariance matrix gives \(SE(\hat{\beta}_1)=1.2\), \(SE(\hat{\beta}_3)=1.5\), and \(\widehat{\operatorname{Cov}}(\hat{\beta}_1,\hat{\beta}_3)=-0.60\), in squared score points. For illustration, use a large-sample normal critical value of 1.96.

The estimated effect for \(C=1\) is \(8.0-2.0=6.0\) points. Its variance and standard error are

$$ \widehat{\operatorname{Var}}(\hat{\beta}_1+\hat{\beta}_3) =1.2^2+1.5^2+2(-0.60) =1.44+2.25-1.20=2.49, \qquad SE=\sqrt{2.49}=1.578\text{ points}. $$

The approximate 95% confidence interval is

$$ 6.0\pm1.96(1.578) =6.0\pm3.093 =[2.907,\;9.093]\text{ points}. $$

Under the stated large-sample approximation, the interval procedure would cover the \(C=1\) model-based IV effect in 95% of repeated samples. It is not a statement that there is a 95% probability that this fixed effect lies in this particular interval.

Common Mistakes and Practical Checks

  • Instrumenting \(D\) but not \(DC\). This leaves an endogenous regressor untreated by the IV procedure. Include both \(Z\) and \(ZC\) among the excluded instruments, alongside the included exogenous regressors.
  • Interpreting \(\beta_1\) as the effect for everyone. It is the \(C=0\) effect in this parameterization; the \(C=1\) effect is \(\beta_1+\beta_3\).
  • Assuming pooled relevance guarantees group-specific identification. A strong overall association between \(Z\) and \(D\) can coexist with little or no first-stage variation in one group. Inspect first-stage information by \(C\), as well as the model’s rank and identification.
  • Calling the interaction difference population-wide effect modification. Under a binary instrument and heterogeneous effects, each group’s IV estimate can be a LATE for that group’s compliers. Those complier populations may differ.
  • Omitting the covariate main effect. The model should include \(C\) as an included exogenous regressor when it includes \(DC\). Otherwise, the specification imposes an unnecessary restriction on baseline outcome levels across groups.

The interaction approach is useful when the covariate groups and comparison are motivated in advance and the instrument supplies adequate variation in both. Report the group-specific effects, their units, the interaction contrast, uncertainty for each requested contrast, and the assumptions that support a causal interpretation.

Check Your Understanding

Use the model and assumptions described above to answer these questions.

  1. If \(\hat{\beta}_1=3.2\) and \(\hat{\beta}_3=0.8\), what are the estimated treatment effects at \(C=0\) and \(C=1\), and what does the interaction estimate compare?
  2. Why is \(DC\) generally treated as endogenous even when \(C\) is an exogenous covariate?
  3. Which excluded instrument interaction should accompany \(Z\) when instrumenting \(DC\)? What other regressors belong in the instrument set?
  4. What additional assumption permits a group-specific binary-IV estimate to be interpreted as a complier average treatment effect?
  5. Why might a difference between group-specific IV estimates fail to represent effect modification for the same population?
Clinical Biostats