Tutorials › Propensity Score Matching and Instrumental Variables › Predictor Substitution And Residual Inclusion Compared

Binary and Nonlinear Outcome IV Methods · Tutorial 555 of 699

Predictor Substitution And Residual Inclusion Compared

Learn when predictor substitution or residual inclusion can be justified for nonlinear outcomes, and how their fitted contrasts should be interpreted.

Advanced 10 min read

What You'll Learn

  • Distinguish first-stage fitted treatment values from first-stage residuals.
  • Explain why nonlinear links generally make predictor substitution invalid.
  • Identify the additional control-function assumptions required for residual inclusion.
  • Calculate and interpret illustrative fitted risks and risk differences.
  • Diagnose misspecification, weak instruments, and unsupported causal interpretations.

Two Routes From an Instrument to a Nonlinear Outcome Model

With a continuous outcome and a linear structural model, instrumental-variable methods can use a first-stage fitted treatment value in a second-stage regression. For a binary or otherwise nonlinear outcome, it is tempting to carry over the same recipe: predict treatment from the instrument and covariates, then put that prediction in a logit or probit model. A second approach instead puts the observed treatment and a first-stage residual into the nonlinear outcome model. These procedures are called two-stage predictor substitution (2SPS) and two-stage residual inclusion (2SRI).

They are not interchangeable versions of one general rule. Each requires assumptions connecting the first-stage model to the structural outcome model. In particular, a good first-stage fit does not itself establish that either second-stage procedure estimates a causal effect.

Definition: Let \(Y\) be an outcome, \(D\) an endogenous treatment, \(Z\) an instrument, and \(X\) observed covariates. In 2SPS, estimate the conditional treatment mean \(p(Z,X)=E[D\mid Z,X]\), then use its fitted value in the nonlinear outcome model in place of \(D\). In 2SRI, estimate the first stage, form a residual or other appropriate control-function term \(R\), and include both the observed \(D\) and \(R\) in the nonlinear outcome model.

For binary treatment, a common first stage is a correctly specified model for \(p(Z,X)=P(D=1\mid Z,X)\). Its fitted value is \(\hat p_i\), and the observed-treatment residual is \(R_i=D_i-\hat p_i\). This raw residual is one possible control-function term, not a universal solution: the required control function depends on the first-stage and latent-error model.

Assumptions Before Either Procedure

Both approaches are considered in an instrumental-variable setting. The instrument must predict treatment after conditioning on \(X\) (relevance); it must be independent of unmeasured causes of the outcome, conditional on \(X\) (instrument independence); and it must affect the outcome only through treatment (exclusion). Consistency and no interference are also needed for potential-outcome causal interpretations. These conditions are substantive: they cannot be verified merely by fitting the two equations.

The first stage must also be suitable for the treatment data and covariates. For binary \(D\), its fitted probabilities should be compatible with the observed data and the model should adequately represent \(P(D=1\mid Z,X)\). Lack of overlap or a weak relationship between \(Z\) and \(D\) can make the fitted values uninformative or unstable. The outcome model must likewise use an appropriate link and include the required covariates and functional forms.

The key difference is what each method assumes about the connection between treatment and the outcome model. 2SPS needs the structural outcome relationship to remain valid when the treatment is replaced by its conditional mean. 2SRI instead needs the included control function to account for the dependence between treatment and unobserved outcome determinants, so that the resulting conditional outcome model is correctly specified. The earlier material on control-function logic and residual inclusion motivates this second condition; the comparison here emphasizes that it does not follow automatically from having a first stage.

Why Substitution Is Different Under a Nonlinear Link

Consider a binary outcome model whose conditional mean, for a fixed value of \(X\), is \(g^{-1}(\eta+\tau D)\), where \(g^{-1}\) is a nonlinear inverse link. If \(D\) is binary and \(P(D=1\mid Z,X)=p\), the mean obtained by averaging the two treatment-specific response values is

$$ (1-p)g^{-1}(\eta)+p\,g^{-1}(\eta+\tau). $$

2SPS instead evaluates the response function at the mean treatment:

$$ g^{-1}(\eta+\tau p). $$

These are generally unequal. The first is an average of response probabilities; the second is a response probability calculated at an average treatment value. This distinction is the nonlinear analogue of the fact that, in general, averaging and applying a nonlinear function do not commute. With a linear identity-link mean, by contrast, averaging a linear function of \(D\) gives the same value as evaluating it at \(E[D\mid Z,X]\). That special property helps explain why predictor substitution has a clearer justification in linear models than in logit or probit models.

Worked Example: The Nonlinear Substitution Gap

Suppose, purely for illustration, a binary response curve is \(\operatorname{expit}(-1.2+1.0D)\), where \(\operatorname{expit}(a)=1/(1+e^{-a})\). Suppose the first-stage treatment probabilities are \(p=0.30\) at one instrument value and \(p=0.70\) at another. Compare averaging the two treatment-specific risks with evaluating the curve at the fitted mean treatment.

The treatment-specific risks are \(\operatorname{expit}(-1.2)=0.2314752\) and \(\operatorname{expit}(-0.2)=0.4501660\). At \(p=0.30\), averaging these risks gives \(0.70(0.2314752)+0.30(0.4501660)=0.2970824\). Predictor substitution instead gives \(\operatorname{expit}(-1.2+0.30)=\operatorname{expit}(-0.90)=0.2890505\).

At \(p=0.70\), the averaged risk is \(0.30(0.2314752)+0.70(0.4501660)=0.3845588\), whereas substitution gives \(\operatorname{expit}(-1.2+0.70)=\operatorname{expit}(-0.50)=0.3775407\). The difference between the two averaged risks is \(0.3845588-0.2970824=0.0874764\); the difference between the two substitution predictions is \(0.3775407-0.2890505=0.0884902\). The discrepancies arise from the nonlinear response curve, not from arithmetic error. This calculation illustrates why the procedures target different model-based quantities absent extra assumptions; it does not establish that either contrast is a causal effect.

When Residual Inclusion Can Be Justified

Residual inclusion aims to retain the observed treatment in the outcome equation while using a control function to capture the dependence between \(D\) and unobserved outcome determinants. A useful way to express its central requirement is that, conditional on \(D\), \(X\), and the correctly specified control function \(R\), the outcome model no longer has relevant residual dependence on the instrument or on the unobserved source of treatment selection. The second-stage response model must then correctly represent \(E[Y\mid D,X,R]\).

Under such a model, a nonlinear outcome regression can take a form such as \(E[Y\mid D,X,R]=\operatorname{expit}(\beta_0+\beta_DD+\beta_X^\mathsf{T}X+\gamma R)\). The treatment coefficient \(\beta_D\) is a conditional log-odds coefficient in this specified model; it is not automatically a population-average risk difference or a universal treatment effect. A causal contrast on the risk scale requires predicting outcomes under the relevant treatment values and averaging over an appropriate covariate and control-function distribution, with the model assumptions in place.

For a binary first stage, \(D-\hat p\) is an observable residual that may be appropriate under a suitable control-function model. But a binary treatment is not a linear first-stage outcome, and its residual need not have the properties of a linear-model error. In other latent-error structures the appropriate control function can be a different function of the first-stage information. Thus, “include a residual” is not enough: the residual’s form and the outcome equation must follow from a coherent model.

Worked Example: Interpreting a Residual-Inclusion Prediction

Consider a hypothetical fitted 2SRI logit model with linear predictor \(-1.2+1.0D+0.8R\). Suppose a person has first-stage fitted treatment probability \(\hat p=0.70\) and observed treatment \(D=1\). The observed residual is \(R=D-\hat p=1-0.70=0.30\). Compare the model-predicted risks for \(D=0\) and \(D=1\), holding this control-function value fixed.

At \(D=0\), the linear predictor is \(-1.2+0.8(0.30)=-0.96\), so the predicted risk is \(\operatorname{expit}(-0.96)=0.276878\). At \(D=1\), it is \(-1.2+1.0+0.8(0.30)=0.04\), so the predicted risk is \(\operatorname{expit}(0.04)=0.509999\). The model-based difference is \(0.509999-0.276878=0.233121\), or about 23.31 percentage points.

This is a contrast in fitted probabilities at the stated control-function value, not automatically an average causal effect for a population. Giving it a causal interpretation requires the instrument and control-function assumptions, correct model specification, and a suitable averaging procedure. The numbers alone do not verify those conditions.

Comparing the Procedures in Practice

Feature2SPS2SRI
Second-stage treatment termFirst-stage fitted treatment valueObserved treatment
Additional first-stage termNone in the basic procedureResidual or model-justified control function
Key nonlinear-model requirementSubstitution must represent the intended structural response; this is restrictive for nonlinear linksControl function must capture treatment endogeneity and the conditional outcome model must be correct
InterpretationDepends on the structural model; the fitted-treatment coefficient is not automatically a causal treatment effectConditional model coefficients are not generally marginal effects; compute and average predictions for a risk-scale contrast

The comparison is not a guarantee that 2SRI is valid whenever 2SPS is questionable. 2SRI is often more defensible for nonlinear outcomes when an appropriate control-function derivation is available, but it can fail if the control function is wrong, the outcome model is misspecified, the instrument assumptions fail, or the instrument provides little treatment information. Conversely, 2SPS can be justified in particular structural models, including suitable linear-mean settings, but nonlinear substitution requires a clear argument rather than an assumption that the familiar two-stage recipe still applies.

Diagnostics, Inference, and Common Pitfalls

Diagnostics should examine each stage and the implied causal design. Check whether the instrument predicts treatment conditional on \(X\), whether fitted probabilities are extreme or poorly supported, and whether the first-stage and outcome-model specifications are plausible. Inspect whether residual inclusion has an appropriate form for the assumed latent-error structure. Sensitivity to the instrument set or to plausible model specifications is informative, but no diagnostic test proves exclusion or independence.

Because the second-stage model uses estimated first-stage quantities, uncertainty from the first stage must be accounted for. Treating fitted values or residuals as known can produce incorrect standard errors. Use an inference procedure justified for the estimator and design, such as a suitable joint estimating-equation method or bootstrap that repeats both stages. If instrument strength is doubtful, conventional second-stage inference can also be unreliable; weak-instrument-robust methods address a different issue and do not repair a false exclusion restriction or an invalid nonlinear specification.

  • Pitfall: “The first stage is strong, so 2SPS is valid.” Relevance concerns how much the instrument predicts treatment. It does not make a nonlinear response commute with averaging or establish the structural substitution assumption.
  • Pitfall: “The residual is just another covariate, so any residual works.” Correction: residual inclusion depends on a control-function justification. The appropriate term and its functional form depend on the treatment and latent-error model.
  • Pitfall: “The treatment coefficient is the population risk difference.” Correction: in a logit model it is a conditional log-odds coefficient. Obtain a risk-scale contrast by predicting under treatment alternatives and averaging over the target distribution, while preserving the model’s assumptions.

Neither procedure removes the need for substantive knowledge of the instrument or for a well-specified structural model. 2SPS is attractive for its simple second stage but has a demanding nonlinear substitution condition. 2SRI keeps the observed treatment and can accommodate nonlinear outcome models under a justified control function, but its validity is model-dependent. Choosing between them requires stating the target quantity and explaining why the proposed model identifies it.

Worked Example: Choosing a Procedure for a Binary Outcome

A hypothetical evaluation uses an encouragement \(Z\) as an instrument for a binary treatment \(D\), with a binary outcome \(Y\) and baseline covariates \(X\). The proposed analysis is a logit outcome model. Which approach is defensible from this information alone?

Neither approach is justified yet. First, the analyst must support relevance, conditional instrument independence, exclusion, consistency, and no interference. Next, the analyst must specify the treatment model and assess whether its fitted probabilities have useful support.

For 2SPS, the analyst must additionally justify why using \(E[D\mid Z,X]\) in the nonlinear structural response gives the intended outcome relationship. The nonlinear averaging calculation above shows why this is not automatic. For 2SRI, the analyst must derive or otherwise justify a control function for this treatment model and show how it enters the conditional outcome model. A raw \(D-\hat p\) term should not be selected solely because it is easy to compute.

Therefore the defensible decision is conditional: use 2SRI if a suitable control-function model and outcome specification are supported; use 2SPS only if its substitution condition is supported. If neither model has a credible justification, choose neither merely for convenience, and report that the causal contrast is not identified by the proposed analysis as specified.

Check Your Understanding

Answer each question, then compare your reasoning with the short solutions.

  1. For binary treatment with fitted probability \(p\), what does the raw first-stage residual equal?
  2. Why does a nonlinear link generally make \(g^{-1}(\eta+\tau p)\) differ from \((1-p)g^{-1}(\eta)+p g^{-1}(\eta+\tau)\)?
  3. In a 2SRI logit model, does the treatment coefficient directly equal a population-average risk difference?
  4. Name two instrumental-variable assumptions that are needed beyond a correctly specified first stage.
  5. What must be justified before using \(D-\hat p\) as the residual-inclusion term?

Solutions. (1) \(D-p\), or in estimation \(D-\hat p\). (2) The inverse link is nonlinear, so applying it to an average input generally differs from averaging its output. (3) No; it is a conditional log-odds coefficient in the specified model. A risk-scale causal contrast requires suitable predictions and averaging under the identifying assumptions. (4) For example, conditional instrument independence and exclusion; relevance is also required. (5) The assumed treatment and latent-error structure must justify that this residual is an appropriate control function and that its inclusion yields a correctly specified outcome model.

Clinical Biostats