Tutorials › Propensity Score Matching and Instrumental Variables › A Worked Anderson-Rubin Analysis With One Instrument

Weak-Instrument Diagnostics · Tutorial 549 of 699

A Worked Anderson-Rubin Analysis With One Instrument

Learn to test candidate treatment effects with a heteroskedasticity-robust Anderson–Rubin statistic and invert those tests to obtain a confidence set.

Advanced 13 min read

What You'll Learn

  • State the null hypothesis and the assumptions behind a one-instrument Anderson–Rubin test.
  • Fit the adjusted-outcome regression for a candidate treatment effect.
  • Calculate a heteroskedasticity-robust Wald statistic and its asymptotic p-value.
  • Invert candidate-effect tests to find a confidence set.
  • Check how the robust variance changes across candidate effects.
  • Recognize what Anderson–Rubin inference does and does not protect against.

Testing a Candidate Treatment Effect

A weak first stage can make conventional instrumental-variable estimates and their usual confidence intervals unreliable. The Anderson–Rubin (AR) approach instead asks, for each proposed treatment effect, whether the instrument is still associated with an outcome after subtracting that proposed effect of treatment. This tutorial works through that calculation with one instrument and a heteroskedasticity-robust variance estimate.

Definition: For a candidate treatment effect \(\tau_0\), the adjusted outcome is \(Y-\tau_0D\). A one-instrument Anderson–Rubin test of \(H_0:\tau=\tau_0\) regresses this adjusted outcome on the instrument and any included exogenous covariates, then tests whether the instrument coefficient is zero. With one instrument, the robust Wald statistic is the squared robust \(t\)-statistic for that coefficient.

To see the logic, suppose the structural outcome model is \(Y=\tau D+X'\gamma+u\), where \(D\) is treatment, \(X\) denotes included exogenous covariates, and the instrument \(Z\) is excluded from the structural outcome equation. Under \(H_0:\tau=\tau_0\), subtracting \(\tau_0D\) gives \(Y-\tau_0D=X'\gamma+u\). If the instrument is valid, it should have no association with this adjusted outcome after accounting for \(X\). The AR test checks that implication directly.

The usual conditions include a correctly specified linear structural relationship for the estimand, instrument exclusion, and instrument exogeneity: conditional on \(X\), the instrument is uncorrelated with the structural error under the null. The observations must also support a valid large-sample approximation, with suitable finite moments and a nondegenerate robust variance estimate. For the heteroskedasticity-robust Wald test below, the null statistic is compared with a chi-square distribution with one degree of freedom. This is an asymptotic approximation, not an exact small-sample result.

A key feature is that the test does not divide by an estimated first-stage coefficient. Its null distribution therefore does not require the instrument to be strongly predictive of treatment. Weak-instrument robustness does not, however, make an invalid instrument valid or cure misspecification of the structural model.

A Hypothetical Data Set and the Robust Statistic

Consider 80 hypothetical observations, with a binary instrument \(Z\), treatment \(D\), and continuous outcome \(Y\). The table lists four possible \((D,Y)\) pairs within each instrument group; each listed pair occurs 10 times.

Instrument \(Z\)Treatment \(D\)Outcome \(Y\)Count
00.4510.410
00.459.610
00.0510.410
00.059.610
10.9511.410
10.9510.610
10.5511.410
10.5510.610

The mean treatment is \(0.25\) when \(Z=0\) and \(0.75\) when \(Z=1\), so the difference is \(0.50\). The mean outcome is \(10\) and \(11\), respectively, so its difference is \(1.00\). For a candidate \(\tau_0\), the difference in adjusted-outcome means is therefore \(1.00-0.50\tau_0\).

With an intercept and binary \(Z\), the regression coefficient of \(Z\) is the difference between the two group means. For the HC0 heteroskedasticity-robust variance of that difference, sum the squared regression residuals separately in each group and divide each sum by the squared group size. Here each group has 40 observations. Within each group, treatment deviations from its group mean follow the pattern \(+0.2,+0.2,-0.2,-0.2\), while outcome deviations follow \(+0.4,-0.4,+0.4,-0.4\); each pattern of four occurs 10 times. The cross-products cancel, so the within-group sum of squared residuals for \(Y-\tau_0D\) is \(6.4+1.6\tau_0^2\). Thus the two group contributions give

$$ \widehat{\operatorname{Var}}_{\mathrm{HC0}}(\hat{\pi}_{\tau_0}) =2\frac{6.4+1.6\tau_0^2}{40^2} =0.008+0.002\tau_0^2, $$

where \(\hat{\pi}_{\tau_0}\) is the estimated instrument coefficient in the regression of \(Y-\tau_0D\) on an intercept and \(Z\). The robust AR statistic is

$$ AR(\tau_0) = \frac{(1.00-0.50\tau_0)^2} {0.008+0.002\tau_0^2}. $$

Worked Example: Testing a Candidate Effect of One

Test \(H_0:\tau=1\) against the alternative that the treatment effect differs from 1. The adjusted-outcome difference is \(1.00-0.50(1)=0.50\). The robust variance is \(0.008+0.002(1)^2=0.010\), so

$$ AR(1)=\frac{0.50^2}{0.010} =\frac{0.25}{0.010}=25.0. $$

Under the null, compare this with a chi-square distribution with one degree of freedom. The p-value is approximately \(5.7\times10^{-7}\). At the 5% significance level, reject the candidate effect of 1. In context, the data provide strong evidence against a treatment effect of 1 outcome unit per treatment unit, under the stated model and instrument assumptions. This is not a probability that the null hypothesis is true.

Worked Tests Across Candidate Values

The same calculation can be repeated for any proposed value. The statistic depends on both the adjusted-outcome association and its robust variance; it is not enough to examine the numerator alone.

Worked Example: A Candidate Effect of Zero

For \(H_0:\tau=0\), the adjusted outcome is just \(Y\). Its mean difference across instrument groups is \(1.00\), and the robust variance is \(0.008+0.002(0)^2=0.008\). Therefore,

$$ AR(0)=\frac{1.00^2}{0.008}=125. $$

The chi-square(1) p-value is approximately \(5.7\times10^{-29}\), far below 0.05. The null of no treatment effect is rejected in this hypothetical example. This conclusion is conditional on the validity and model assumptions; a small p-value cannot diagnose whether the instrument is actually valid.

Worked Example: A Candidate Effect of Three

For \(\tau_0=3\), the adjusted-outcome difference is \(1.00-0.50(3)=-0.50\). The robust variance is \(0.008+0.002(3)^2=0.026\). Hence

$$ AR(3)=\frac{(-0.50)^2}{0.026} =\frac{0.25}{0.026} \approx 9.615. $$

The chi-square(1) p-value is approximately 0.0019, so this candidate is rejected at the 5% level. The negative sign of the adjusted-outcome difference does not make the statistic negative: the Wald statistic squares the estimated association.

Inverting the Tests to Obtain a Confidence Set

A 95% AR confidence set contains every candidate effect not rejected by a two-sided 5% test. For one instrument, the 5% critical value from the chi-square distribution with one degree of freedom is approximately 3.841. Consequently, in this example retain values satisfying

$$ \frac{(1-0.50\tau_0)^2}{0.008+0.002\tau_0^2} \leq 3.841. $$

The denominator is positive for every real \(\tau_0\), so multiply both sides by it without changing the inequality direction. Rearranging gives

$$ (0.25-0.002(3.841))\tau_0^2-\tau_0+ (1-0.008(3.841))\leq 0, $$

or, to the shown precision, \(0.242318\tau_0^2-\tau_0+0.969272\leq0\). Solving the quadratic equation gives roots of approximately 1.556 and 2.571. Since the quadratic coefficient is positive, the inequality holds between the roots. The resulting 95% AR confidence set is approximately \([1.556,\,2.571]\) outcome units per treatment unit.

Under the assumptions and the large-sample approximation, this procedure has 95% coverage in repeated sampling. It does not mean there is a 95% probability that the fixed treatment effect lies in this particular realized interval. Here the set is bounded and connected, but AR confidence sets need not always have those shapes: their form depends on the data and the variance as a function of the candidate effect.

Worked Example: Checking a Candidate Against the Inverted Set

The effect \(\tau_0=2\) lies between the calculated endpoints. Directly checking the test confirms it is retained: the adjusted-outcome difference is \(1.00-0.50(2)=0\), and the variance is \(0.008+0.002(4)=0.016\). Thus \(AR(2)=0^2/0.016=0\), which is below 3.841. The test does not reject 2. By contrast, the candidate 3 has a statistic of about 9.615, above the critical value, and so is outside the set.

Why the Robust Version Matters—and What to Check

The robust variance allows the residual variance to differ across observations rather than assuming constant error variance. It must be calculated for the adjusted outcome at each candidate value: changing \(\tau_0\) changes both the residuals and the estimated variance. In this example, the variance is \(0.008+0.002\tau_0^2\), not a single fixed number used for every test.

For a general sample with covariates, fit the regression of \(Y-\tau_0D\) on \(Z\) and \(X\), and use a heteroskedasticity-consistent sandwich variance for the instrument coefficient. Test that coefficient against zero. A cluster-robust design requires an appropriate cluster-robust variance estimator rather than treating observations within a cluster as independent. With a small number of independent observations or clusters, the asymptotic chi-square calibration may be poor; robust standard errors alone do not guarantee accurate finite-sample inference.

The main alternative is a conventional interval based on the two-stage least-squares estimate and its standard error. That approach can be more precise when its approximations are reliable, but its usual inference can have poor size when the first stage is weak. The AR procedure trades some potential precision for inference that remains valid asymptotically under weak instrument relevance, given the other assumptions. The earlier material on the Conditional Likelihood Ratio test and bootstrap Anderson–Rubin inference presents other approaches; those methods are not needed to calculate the one-instrument statistic here.

  • Check the first-stage and design context. AR inference does not require a strong first stage, but the strength and design still matter for understanding the data and choosing among methods.
  • Check instrument assumptions separately. AR rejection or non-rejection does not establish exclusion or exogeneity.
  • Check the variance calculation. Use the robust variance for the adjusted outcome at each candidate, not a variance copied from another candidate.
  • Check the calibration. A robust Wald statistic compared with chi-square(1) is an asymptotic procedure; small samples may need additional care.
Common pitfall: It is incorrect to say, “The AR test is weak-instrument robust, so the instrument need not be valid.” Weak-instrument robustness addresses uncertainty from a weak first stage. The test still relies on instrument exogeneity, exclusion, and a suitable structural model. Those assumptions require substantive justification, not merely a favorable test statistic.

Check Your Understanding

Answer each question, then compare with the solutions below.

  1. In the worked data, what is the difference in adjusted-outcome means when \(\tau_0=2\)?
  2. Why is a one-instrument robust Wald AR statistic compared with a chi-square distribution with one degree of freedom?
  3. If a candidate value is not rejected at the 5% level, what does that say about its membership in the 95% AR confidence set?
  4. Does weak-instrument robustness establish that an instrument satisfies exclusion and exogeneity?

Solutions. (1) The difference is \(1.00-0.50(2)=0\). (2) The tested instrument coefficient is a single scalar; its squared robust Wald statistic has an asymptotic chi-square(1) null distribution under the stated conditions. (3) It belongs to the inverted 95% set, subject to the same assumptions and approximation. (4) No. Weak-instrument robustness concerns weak relevance, not instrument validity; exclusion and exogeneity need separate justification.

Clinical Biostats