Tutorials › Propensity Score Matching and Instrumental Variables › First-Stage Plots and Leverage Diagnostics

Weak-Instrument Diagnostics · Tutorial 525 of 699

First-Stage Plots and Leverage Diagnostics

Use first-stage plots and leverage measures to distinguish weak prediction from influential observations or a poorly specified first-stage model.

Advanced 11 min read

What You'll Learn

  • Explain what fitted-value and residual plots can reveal about first-stage prediction.
  • Construct partial-residual displays that account for included exogenous covariates.
  • Calculate leverage in a simple first-stage regression and assess influential observations.
  • Distinguish visual diagnostics from formal instrument-strength tests.
  • Recognize signs of nonlinearity, outlier sensitivity, and overfitting.

Why Inspect the First Stage?

Instrument-strength statistics compress a first-stage regression into numerical summaries. Plots add a different kind of information: they show how prediction varies across observations and whether a small number of unusual observations, curvature, or changing spread may be shaping the summary. A high first-stage fit can be driven by a few influential points, while a low fit may conceal structure that a linear model fails to capture. Visual diagnostics help identify these patterns; they do not replace formal strength tests or establish that an instrument is valid.

Let \(D_i\) denote an endogenous regressor, \(Z_i\) an instrument or vector of instruments, and \(X_i\) the included exogenous covariates. The conventional linear first stage regresses \(D_i\) on an intercept, \(Z_i\), and \(X_i\). Its fitted values are \(\widehat D_i\), and its residuals are \(\widehat u_i=D_i-\widehat D_i\). The fitted values summarize the part of \(D_i\) predicted by the regressors in this model; they are not observed treatment values or causal effects.

Definition: A fitted-value plot displays observed \(D_i\) against \(\widehat D_i\), often with a 45-degree reference line, or displays \(\widehat D_i\) against an instrument or covariate. A partial-residual display plots the variation in \(D_i\) left after accounting for \(X_i\) against the corresponding variation in \(Z_i\). A leverage value measures how unusual observation \(i\)'s first-stage regressor values are relative to the regressor configuration in the sample.

Fitted Values and Partial Relationships

For a single instrument, an observed-versus-fitted plot places \(D_i\) on the vertical axis and \(\widehat D_i\) on the horizontal axis. Points close to the 45-degree line have small first-stage residuals; substantial scatter indicates prediction error. This plot is useful for spotting outliers and broad mismatch, but it is not a direct plot of instrument relevance. A narrow range of fitted values can still have points close to the line, and a high overall fit can be dominated by the variation in included covariates rather than by the instrument.

To inspect the instrument's relationship with \(D_i\) conditional on \(X_i\), remove the linear projection on \(X\) from both variables. Write \(M_X=I-X(X'X)^{-1}X'\), assuming \(X\) has full column rank and includes an intercept. Then \(\widetilde D=M_XD\) and \(\widetilde Z=M_XZ\) are the residuals from regressing \(D\) and \(Z\), respectively, on \(X\). Plotting \(\widetilde D_i\) against \(\widetilde Z_i\) displays their conditional linear association. With multiple instruments, the display is made separately for each residualized instrument or uses an appropriate multivariate diagnostic.

The justification is the Frisch-Waugh-Lovell result: in the linear regression of \(D\) on \(X\) and \(Z\), the coefficient on \(Z\) is the coefficient from regressing \(M_XD\) on \(M_XZ\). Thus the partial-residual display isolates the same conditional linear relationship represented by the first-stage coefficient. It is a diagnostic visualization of that relationship, not a new estimate with different identifying assumptions.

$$ \widehat\pi_Z=(Z'M_XZ)^{-1}Z'M_XD $$

This expression assumes that \(Z'M_XZ\) is invertible. For a single instrument, the plotted slope is \(\sum_i\widetilde Z_i\widetilde D_i/\sum_i\widetilde Z_i^2\). Curvature in the display, clusters, or a relationship that appears only at the extremes can suggest that a linear first-stage summary is inadequate or fragile. Such patterns require investigation rather than automatic changes to the model.

Worked Example: A Nearly Flat First-Stage Pattern

Suppose six hypothetical observations have instrument values \(Z=(0,1,2,3,4,5)\) and endogenous-regressor values \(D=(10,10.2,9.8,10.1,9.9,10)\). There are no additional covariates. Consider the intercept-and-slope first-stage regression and its plot of observed \(D_i\) against \(Z_i\).

The means are \(\bar Z=2.5\) and \(\bar D=10\). The centered cross-product is \(\sum_i(Z_i-\bar Z)(D_i-\bar D)=-0.30\), and \(\sum_i(Z_i-\bar Z)^2=17.5\). Therefore the slope and intercept are \(\widehat\pi_Z=-0.30/17.5=-0.01714\) units of \(D\) per unit of \(Z\), and \(\widehat\pi_0=10-(-0.01714)(2.5)=10.0429\).

The total sum of squares is \(SST=\sum_i(D_i-\bar D)^2=0.10\). The regression sum of squares is \(\widehat\pi_Z^2\sum_i(Z_i-\bar Z)^2=0.005143\), so \(SSE=0.10-0.005143=0.09486\) and \(R^2=1-SSE/SST=1-0.09486/0.10=0.05143\). The scatterplot would show little linear trend, consistent with the small fitted slope and low \(R^2\) in this simple regression. This sample pattern signals weak linear prediction, but it is not by itself a formal test or a general conclusion about instrument validity.

Leverage and Influence

A first-stage plot should be paired with a check for observations that occupy unusual positions in the regressor space. For a linear regression with design matrix \(W=[X,Z]\), including the intercept, the projection matrix is \(H=W(W'W)^{-1}W'\) when \(W\) has full column rank. Its diagonal element \(h_{ii}\) is the leverage of observation \(i\). Leverage depends on the regressors, not on the observed value of \(D_i\) or the size of its residual. If the model has \(p\) linearly independent columns, then \(\sum_i h_{ii}=p\), so average leverage is \(p/n\).

Diagnostic rule of thumb: Values substantially above \(2p/n\), and sometimes \(3p/n\), are commonly flagged for closer inspection. These cutoffs are heuristics, not hypothesis tests or universal boundaries. High leverage means a point can have substantial capacity to affect the fitted regression; whether it actually does depends also on its residual and the model.

In the simple regression with an intercept and one instrument, leverage has the form \(h_{ii}=1/n+(Z_i-\bar Z)^2/\sum_j(Z_j-\bar Z)^2\). A point far from the instrument mean can therefore have high leverage. To assess influence, compare the fitted first stage and its strength summaries with and without the flagged observation, while treating that comparison as a sensitivity diagnostic—not as permission to delete a point. Check the observation's data source and context, and report defensible analyses transparently. Large leverage combined with a large residual can be especially influential; Cook's distance is one standard measure that combines these features.

Worked Example: One Observation Changes the First-Stage Slope

Consider six hypothetical observations from a simple first stage with an intercept. The first five have \(Z=(0,1,2,3,4)\) and \(D=(2,2.2,2.1,2.4,2.3)\). A sixth observation has \(Z=10\) and \(D=8\). Assess the sixth observation's leverage and compare the slope with and without it.

For all six observations, \(\bar Z=20/6=3.333\), and \(\sum_i(Z_i-\bar Z)^2=\sum_i Z_i^2-6\bar Z^2=130-66.667=63.333\). The leverage of the sixth observation is \(h_{66}=1/6+(10-3.333)^2/63.333=0.8684\). Here \(p=2\), so average leverage is \(2/6=0.3333\), and the heuristic \(2p/n\) flag is \(0.6667\). The sixth observation is well above that flag and warrants investigation.

Using only the first five observations, \(\bar Z=2\), \(\bar D=2.2\), and the centered cross-product is \(0.80\); the centered sum of squares for \(Z\) is \(10\). The slope is \(0.80/10=0.0800\). With all six observations, \(\sum_iZ_iD_i=102.8\), \(\sum_iZ_i=20\), and \(\sum_iD_i=19\). The centered cross-product is \(102.8-(20)(19)/6=39.467\), giving slope \(39.467/63.333=0.6232\). The large change shows that the apparent first-stage slope is highly sensitive to this high-leverage observation. It does not establish that the observation is erroneous: its provenance and the substantive specification must be checked before deciding how to report the analysis.

Patterns to Check and Common Pitfalls

Plot residuals \(\widehat u_i=D_i-\widehat D_i\) against fitted values, instruments, and important covariates. A curved residual pattern suggests that the conditional mean may not be adequately represented by the chosen linear terms. A funnel-shaped spread suggests nonconstant residual variance, and isolated large residuals suggest observations that are poorly predicted. These patterns can affect standard errors and can also expose misspecification; a plot does not identify the correct replacement model. Any added transformations, interactions, or nonlinear terms should be justified and the first-stage diagnostics recomputed.

With many instruments, the fitted values can track the observed \(D_i\) closely in the estimation sample even when the first stage does not provide stable, informative prediction. This is especially important after the earlier material on many instruments and first-stage overfitting: a visually impressive in-sample fit is not evidence that a complex first stage will generalize or that instruments are valid. Consider the number of instruments relative to the sample size, the distribution of leverage, and how results change under defensible specifications.

  • Mistake: treating a high \(R^2\) or close observed-versus-fitted plot as proof of strong instruments. The fit may largely reflect included covariates, high leverage, or many-instrument overfitting. Examine the partial relationship and formal strength diagnostics.
  • Mistake: deleting every high-leverage observation. Leverage is a warning about potential influence, not proof of an error. Verify the record and report sensitivity transparently.
  • Mistake: treating a partial-residual plot as a validity test. It describes conditional prediction under the specified model. It cannot establish instrument exogeneity or the exclusion restriction.

Plots complement, rather than replace, the first-stage F statistic, partial \(R^2\), and robust or multiple-instrument strength procedures appropriate to the design. Formal statistics quantify specified aspects of relevance under their conditions; plots help diagnose shape and sensitivity. Neither approach alone establishes the causal assumptions needed for instrumental-variables interpretation. Visual conclusions can also be unstable in small samples, and plotting does not cure poor overlap in instrument values, measurement error, or an incorrectly specified model.

1
Fit the stated first stage.
Regress \(D\) on the instruments and included exogenous covariates, with an intercept where appropriate, and retain fitted values and residuals.
2
Inspect prediction and conditional patterns.
Use observed-versus-fitted and residual displays; use partial-residual displays to focus on instrument variation conditional on included covariates.
3
Check leverage and sensitivity.
Flag unusual regressor configurations, verify observations, and assess whether fitted patterns and strength summaries depend heavily on them.
4
Combine diagnostics with formal evidence.
Interpret plots alongside suitable first-stage strength measures, and keep relevance separate from instrument-validity assumptions.

Check Your Understanding

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

  1. What does a partial-residual display show that an unadjusted plot of \(D_i\) against \(Z_i\) may not?
  2. In a regression with \(p=4\) independent design columns and \(n=40\), what is average leverage? What does the heuristic \(2p/n\) equal?
  3. Why does a high-leverage observation not automatically need to be removed?
  4. Does a close observed-versus-fitted plot establish instrument exogeneity? Explain.

Solutions. (1) It shows the linear association between residualized \(D\) and residualized \(Z\), accounting for the included covariates \(X\). (2) Average leverage is \(p/n=4/40=0.10\); the heuristic flag is \(2p/n=8/40=0.20\). The flag is a rule of thumb, not a formal cutoff. (3) Leverage describes unusual regressor values and potential influence, not data validity. Check the observation and compare defensible sensitivity analyses before deciding how to report it. (4) No. The plot concerns prediction in the specified first stage; it cannot establish exogeneity or the exclusion restriction.

Clinical Biostats