← All Economics manuals

Economics · Econometrics Economics

Econometrics Economics

From probability and least squares to causal identification, time series and modern prediction: a complete study path with explanations, worked examples, formulas, tables and graphs.

19chapters
202topics

13. Instrumental Variables and Two-Stage Least Squares

Identification through excluded variation, weak instruments and IV inference

Motivation and the instrumental-variable idea

When a regressor is endogenous, a valid instrumental variable Z supplies variation in X that is unrelated to the structural error affecting Y. Consider the structural model Y=β0+β1D+u. A valid instrument must satisfy relevance—it predicts D after included controls—and exogeneity or exclusion—it is uncorrelated with u and does not affect Y through another causal channel under the target structural model. These restrictions are economically substantive. A high correlation between Z and D proves neither the exclusion restriction nor the absence of direct effects.

In a just-identified linear model with a single instrument and an intercept, the IV slope solves the sample moment ΣZi(Yi−β0−β1Di)=0 together with the intercept moment. Its simple form is

β̂IV=Covn(Z,Y)Covn(Z,D)\hat\beta^{\mathrm{IV}}=\frac{\operatorname{Cov}_n(Z,Y)}{\operatorname{Cov}_n(Z,D)}

In the population, if Cov(Z,u)=0 and Cov(Z,D)≠0, the ratio identifies β1. If the instrument barely predicts D, the denominator is near zero and IV estimation can be extremely unstable; this is the weak-instrument problem.

The Wald estimator with a binary instrument

When Z is binary, the covariance ratio becomes a ratio of group differences:

β̂Wald=Y‾Z=1−Y‾Z=0D‾Z=1−D‾Z=0\hat\beta^{\mathrm{Wald}}=\frac{\bar Y_{Z=1}-\bar Y_{Z=0}}{\bar D_{Z=1}-\bar D_{Z=0}}

The numerator is the reduced-form effect of the instrument on the outcome. The denominator is the first-stage effect of the instrument on treatment uptake. IV scales the outcome effect of assignment by the induced change in treatment. It therefore does not require all participants to comply perfectly, but its causal meaning with heterogeneous treatment effects depends on additional assumptions.

Two-stage least squares (2SLS)

With multiple controls W and possibly multiple excluded instruments Z, first regress each endogenous explanatory variable on the excluded instruments and all included exogenous controls. The fitted values isolate the linear projection of endogenous regressors onto instrument variation. Then regress the outcome on those projected regressors and the included controls. For a single endogenous regressor D,

Di=π0+Zi′π1+Wi′π2+viD_i=\pi_0+Z_i'\pi_1+W_i'\pi_2+v_i
Yi=β0+β1D̂i+Wi′γ+eiY_i=\beta_0+\beta_1\hat D_i+W_i'\gamma+e_i

The coefficient is the 2SLS estimator. In practice, use a dedicated IV routine to obtain correct 2SLS standard errors. Ordinary OLS standard errors from a regression that substitutes D̂ as if it were observed without error are generally incorrect because they fail to use the appropriate structural residuals and IV covariance structure.

The 2SLS matrix estimator in the full instrument model is

β̂2SLS=(X′PZX)−1X′PZy,PZ=Z(Z′Z)−1Z′\hat\beta^{\mathrm{2SLS}}=(X'P_ZX)^{-1}X'P_Zy,\qquad P_Z=Z(Z'Z)^{-1}Z'

where X contains endogenous and included exogenous regressors and Z contains all valid instruments, including the included exogenous regressors. The rank condition requires enough linearly independent, relevant excluded instruments to identify all endogenous regressors.

Figure 13.1. Simulated first-stage and reduced-form relationships; their slope ratio provides intuition for just-identified IV.
Figure 13.1. Simulated first-stage and reduced-form relationships; their slope ratio provides intuition for just-identified IV.

Identification and exclusion

Relevance can often be assessed using the data, but exclusion is rarely completely testable and requires institutional reasoning. Instruments may be weak despite statistically significant bivariate associations when the first stage is evaluated conditional on many controls. The direction and size of first-stage coefficients also deserve economic scrutiny. An instrument that shifts both demand and supply, for example, will not isolate one curve by merely being correlated with price.

There are three common identification categories: underidentified when insufficient independent instrument variation exists, just identified when the number of valid instrument restrictions matches endogenous parameters, and overidentified when there are more instruments than endogenous parameters. Overidentification can enable specification checks, but it does not make instruments valid by default.

Weak instruments and the first-stage diagnostic

Weak instruments create finite-sample bias, potentially severe nonnormality and unreliable conventional t and Wald inference. First-stage F-statistics or corresponding conditional robust diagnostics assess relevance, but a universal threshold is not valid in all settings. The familiar F>10 rule is an approximate historical screening heuristic for restricted specifications, not a theorem ensuring correct coverage with heteroskedasticity, clustering or multiple endogenous regressors.

Where weak identification is plausible, report appropriate weak-instrument-robust tests or confidence sets, such as Anderson–Rubin-type procedures under suitable assumptions, and consider whether the empirical design is informative at all. Adding many marginally relevant instruments can make finite-sample performance worse rather than better.

Overidentification tests

With more instrument moment restrictions than structural coefficients, the Hansen J test can assess whether the collection of restrictions is mutually compatible with the specified model and covariance assumptions. A rejection signals that at least one maintained moment condition is inconsistent with the others or with model specification. Nonrejection does not prove validity: invalid instruments could share the same violation, or the test may have low power.

For a single just-identified endogenous regressor and one excluded instrument there is no overidentifying restriction to test. The relevant empirical task is to defend exclusion with subject-matter knowledge and scrutinise the effect of alternative instrument candidates.

Heterogeneous treatment effects and LATE

When the effect of D varies across individuals, IV need not identify the population ATE. With a binary instrument and treatment, potential-treatment monotonicity and other standard assumptions, the Wald ratio identifies the local average treatment effect (LATE): the average effect among compliers, who take treatment if encouraged and do not take it otherwise. This is a population defined by the instrument's effect on behaviour, not a random subset of everyone.

A different instrument may identify a different complier population and thus a different local effect even when both IV estimates are internally valid. Interpreting IV as a universally applicable effect requires considering population heterogeneity and the economic meaning of compliance.

Applying IV in R

The formula in the next example denotes y as outcome, d as endogenous regressor, x1+x2 as included exogenous controls and z as excluded instrument. Robust inference uses a suitable covariance function. With a credible panel or clustered design, replace the covariance approach accordingly.

library(AER)
iv <- ivreg(y ~ d + x1 + x2 | z + x1 + x2, data = dat)
summary(iv, diagnostics = TRUE)
library(lmtest)
library(sandwich)
coeftest(iv, vcov. = vcovHC(iv, type = "HC1"))
# Explain and inspect the first stage:
first_stage <- lm(d ~ z + x1 + x2, data = dat)
summary(first_stage)

The geometry of first-stage relevance

After partialling out the included controls W, the first stage asks whether residualised instruments predict residualised endogenous variation. With one instrument Z and one endogenous regressor D, relevance is Cov(Z̃,D̃)≠0 after both are residualised on W. A nonzero unconditional correlation is not enough if its entire source comes from shared dependence on included controls. A good IV report checks the conditional first stage and the economic mechanism through which the instrument shifts treatment.

In the presence of multiple instruments, a first-stage regression may fit strongly because of instruments individually correlated with D, but identification still requires appropriate rank conditions for all endogenous regressors. For multiple endogenous variables, relevance is a multivariate condition and cannot be reduced to a single bivariate correlation.

IV precision and research design

Even with a genuinely valid instrument, IV estimates can be less precise than OLS because they use only the component of treatment variation predicted by the instrument. This is the price paid for isolating plausibly exogenous variation. Reporting an imprecise but credible estimate can be more scientifically informative than reporting a very precise but confounded OLS association. Comparisons between OLS and IV must consider not only bias but also different weighted effects under treatment-effect heterogeneity.

A numerical two-stage example

Consider an instrument that raises the fitted participation rate from 0.20 to 0.50 and raises the fitted outcome mean from 100 to 112. The reduced form is 12, and the first-stage change is 0.30; the just-identified IV slope is 40 outcome units per induced participation. Now suppose the participation shift were only 0.03 while the estimated reduced form remained 12. The ratio becomes 400, illustrating the explosive sensitivity of the Wald estimator to a weak denominator. This arithmetic does not mean 400 is a plausible effect: the small first stage may make conventional uncertainty approximations unreliable.

How an Anderson–Rubin confidence set is constructed

Consider one endogenous regressor D and a proposed coefficient b. Under the null that b is the true structural effect, subtracting bD from Y leaves a combination of exogenous controls and the structural disturbance. Valid excluded instruments should then have zero coefficients in a regression of Y−bD on those instruments and all included exogenous controls. An Anderson–Rubin test assesses that joint restriction without dividing by an estimated first-stage coefficient.

Invert the test by retaining every b that is not rejected at the chosen significance level. The resulting confidence set can be wide, disconnected or unbounded when the data contain little identifying information. These shapes are meaningful and should not be truncated to create a reassuring finite interval. The classical F version requires its normal and spherical-error assumptions; robust variants use covariance estimators suited to heteroskedasticity or clustering and corresponding asymptotic justification. Protection against weak relevance does not protect against an invalid exclusion restriction. State both the maintained instrument assumptions and the inferential procedure.

𝒞1−α={b:pAR(b)>α},Yi−bDi=Wi′γ+Zi′δ+ei,H0:δ=0\mathcal C_{1-\alpha}=\{b:\;p_{\mathrm{AR}}(b)>\alpha\},\qquad Y_i-bD_i=W_i^{\prime}\gamma+Z_i^{\prime}\delta+e_i,\quad H_0:\delta=0
Torna all’inizio ↑

Ripetizioni personalizzate · Da 15€/h

Un dubbio da chiarire?
Studiamolo insieme.

Offro lezioni personalizzate per studenti delle superiori e dell’università: spiegazioni chiare, esercizi guidati e un metodo costruito sulle tue esigenze. Scopri le materie e le tariffe, oppure prenota una lezione per lavorare sul tuo programma.