Tutorials › Propensity Score Matching and Instrumental Variables › Anderson-Rubin Tests With Included Covariates

Weak-Instrument Diagnostics · Tutorial 530 of 699

Anderson-Rubin Tests With Included Covariates

Learn to partial out included covariates in an Anderson–Rubin test, identify the instrument coefficients tested, and calculate and interpret the resulting F statistic.

Advanced 12 min read

What You'll Learn

  • Write the null-imposed outcome regression with included exogenous covariates and excluded instruments.
  • Partial out covariates and derive the Anderson–Rubin F statistic.
  • Identify why excluded-instrument coefficients are tested jointly while covariate coefficients remain unrestricted.
  • Check rank, sample-size, and error-distribution conditions for the exact F reference distribution.
  • Diagnose common implementation errors and distinguish Anderson–Rubin inference from conventional IV Wald inference.

Why Include Covariates in an Anderson–Rubin Test?

An Anderson–Rubin (AR) test evaluates a proposed value of an instrumental-variables coefficient without relying on a strong first stage. In applications, the structural equation often includes exogenous covariates as well as an endogenous regressor. Those covariates belong in the test regression: leaving them out changes the model being tested and can alter the test statistic.

The key operation is to test whether the excluded instrument or instruments explain the outcome after the included covariates have been accounted for. With several excluded instruments, the relevant coefficients are tested jointly. The covariate coefficients are nuisance parameters: they are included in both regressions but are not part of the AR restriction.

Definition: Let \(y\) be an \(n\)-vector outcome, \(d\) an \(n\)-vector endogenous regressor, \(W\) an \(n \times k\) matrix of included exogenous covariates (including an intercept, if the model has one), and \(Z\) an \(n \times q\) matrix of excluded instruments. Consider the structural model \(y=\beta d+W\gamma+u\). For a candidate value \(\beta_0\), the AR test is the test of \(H_0:\beta=\beta_0\) obtained by regressing \(y-\beta_0d\) on \(W\) and \(Z\), then testing \(H_0:\pi=0\) for the \(q\) coefficients \(\pi\) on \(Z\).

The notation distinguishes included covariates from excluded instruments. The included covariates appear directly in the structural equation and in the test regression. The excluded instruments predict \(d\) but do not appear directly in the structural equation. Under the candidate null, their coefficients in the transformed-outcome regression should be zero if the structural equation and instrument restrictions hold.

Model and Conditions for the F Test

For the stated finite-sample F test, assume the structural equation is correctly specified, the included covariates are exogenous, and the excluded instruments satisfy the relevant exclusion and exogeneity conditions. In particular, the structural error has conditional mean zero given the included covariates and instruments under the null. The usual exact F reference distribution requires the stronger conditional error assumption \(u\mid W,Z \sim N(0,\sigma^2 I)\): errors are conditionally normal, have common variance, and are conditionally uncorrelated.

The design must also have full column rank: \(W\) has rank \(k\), and the columns of \(Z\) add \(q\) independent directions beyond \(W\). Require \(n>k+q\), so the unrestricted regression has positive residual degrees of freedom. Full rank alone is not enough; if \(n=k+q\), the residual degrees of freedom are zero and the residual variance estimate and stated F statistic are undefined.

These conditions concern the test's validity and the exact reference distribution. In particular, the test does not require a large first-stage coefficient. Weak instruments can reduce power, but do not by themselves invalidate the AR test under its instrument and error assumptions. Conversely, an AR test does not establish that an instrument is exogenous or excluded; those are substantive design assumptions.

Partialling Out the Covariates

For a candidate \(\beta_0\), write \(r=y-\beta_0d\). The unrestricted regression is \(r=W\gamma+Z\pi+u\); the restricted regression imposes \(\pi=0\) and includes only \(W\). Thus the null of interest is a restriction on the instrument block, not on the covariates.

Let \(P_W=W(W'W)^{-1}W'\) and \(M_W=I-P_W\), the projection onto the covariate space and the residual-maker for that space. Residualizing \(r\) and \(Z\) against \(W\) gives \(\tilde r=M_Wr\) and \(\tilde Z=M_WZ\). The coefficient test in the full regression is equivalent to testing whether the residualized instruments explain the residualized transformed outcome. This is the Frisch–Waugh–Lovell result applied to the AR regression.

$$ F_{\mathrm{AR}}(\beta_0) = \frac{(SSR_R-SSR_U)/q}{SSR_U/(n-k-q)} = \frac{\tilde r'P_{\tilde Z}\tilde r/q}{SSR_U/(n-k-q)}, \qquad P_{\tilde Z}=\tilde Z(\tilde Z'\tilde Z)^{-1}\tilde Z'. $$

Here \(SSR_R=r'M_Wr\) is the residual sum of squares from the restricted regression, and \(SSR_U\) is the residual sum of squares from the unrestricted regression. The numerator measures the reduction in residual sum of squares from adding the \(q\) excluded instruments, divided by the number of restrictions. The denominator is the unrestricted residual variance estimate, based on \(n-k-q\) residual degrees of freedom. Under \(H_0\) and the stated normal, homoskedastic conditions, \(F_{\mathrm{AR}}(\beta_0)\sim F_{q,n-k-q}\).

The equality in the formula follows because the fitted component from adding \(Z\), after accounting for \(W\), is the projection of \(\tilde r\) onto the column space of \(\tilde Z\). Its sum of squares is \(\tilde r'P_{\tilde Z}\tilde r\), which equals \(SSR_R-SSR_U\). The F test therefore compares the improvement from imposing the candidate null with the residual variation left in the unrestricted regression.

1
Choose a candidate value.
Set \(r=y-\beta_0d\). This is the outcome used in the AR regression for the null \(H_0:\beta=\beta_0\).
2
Fit both regressions on the same observations.
Regress \(r\) on \(W\) for \(SSR_R\), then on \(W\) and \(Z\) for \(SSR_U\).
3
Test the instrument block.
Calculate the F statistic for the joint restriction that all \(q\) coefficients on \(Z\) equal zero, using \(n-k-q\) denominator degrees of freedom.
4
Interpret the result for the candidate.
A small p-value is evidence against \(H_0:\beta=\beta_0\), conditional on the model and test assumptions. It is not a test of the covariate coefficients.

Worked Calculations

Worked Example: One Instrument and Several Covariates

Suppose a hypothetical sample has \(n=24\), \(k=3\) included covariates (one is an intercept), and one excluded instrument, so \(q=1\). For the candidate \(\beta_0\), the restricted regression of \(y-\beta_0d\) on \(W\) has \(SSR_R=75\), and the unrestricted regression on \(W\) and \(Z\) has \(SSR_U=60\). Assume the design is full rank and the conditional normal, homoskedastic error assumptions hold.

The unrestricted residual degrees of freedom are \(24-3-1=20\), which are positive. The F statistic is

$$ F_{\mathrm{AR}}(\beta_0) = \frac{(75-60)/1}{60/20} = \frac{15}{3} = 5.00. $$

For \(F_{1,20}\), the upper-tail p-value is approximately \(0.0369\). At \(\alpha=0.05\), reject \(H_0:\beta=\beta_0\); at \(\alpha=0.01\), do not reject it. The test concerns the coefficient on the excluded instrument in the transformed-outcome regression. The three included-covariate coefficients are estimated in both regressions but are not jointly tested by this AR statistic.

Worked Example: Two Instrument Coefficients Tested Jointly

Consider a hypothetical sample with \(n=12\), \(k=2\) included covariates, and \(q=2\) excluded instruments. After partialling out \(W\), suppose the residualized instrument columns are orthogonal, each has squared length 12, and their inner products with \(\tilde r\) are 6 and 3. Suppose the unrestricted residual sum of squares is 24. These summaries imply an explained sum of squares of

$$ \tilde r'P_{\tilde Z}\tilde r = \frac{6^2}{12}+\frac{3^2}{12} = 3+0.75 = 3.75. $$

The restricted sum of squares is therefore \(SSR_R=SSR_U+3.75=27.75\). The design has positive unrestricted residual degrees of freedom, \(12-2-2=8\). The joint AR statistic is

$$ F_{\mathrm{AR}}(\beta_0) = \frac{(27.75-24)/2}{24/8} = \frac{1.875}{3} = 0.625. $$

Compared with \(F_{2,8}\), the upper-tail p-value is approximately \(0.559\). There is not evidence against this candidate value at conventional significance levels. The numerator uses the combined improvement from both instruments and divides by two restrictions. Testing each instrument coefficient separately would answer different questions and would not be the specified joint AR test.

Worked Example: Why the Covariates Must Stay in Both Regressions

In another hypothetical application, \(n=40\), \(k=4\), and \(q=1\). At a proposed \(\beta_0\), the regression of \(y-\beta_0d\) on the four included covariates has \(SSR_R=118\); adding the excluded instrument gives \(SSR_U=102\). Assuming full rank and the stated error conditions, the unrestricted degrees of freedom are \(40-4-1=35\), and

$$ F_{\mathrm{AR}}(\beta_0) = \frac{(118-102)/1}{102/35} = \frac{16}{2.9143} \approx 5.490. $$

For \(F_{1,35}\), this corresponds to a p-value of about \(0.025\), so the candidate is rejected at the 5% level but not at the 1% level. The calculation compares nested models that both contain the same four covariates. Omitting a covariate from one or both regressions would not be a valid way to “simplify” this calculation: it would change the nuisance adjustment and invalidate this stated comparison.

Diagnostics, Comparisons, and Limitations

Before interpreting a result, verify that the restricted and unrestricted regressions use identical observations and the same \(W\); only the addition of \(Z\) should distinguish them. Check that the covariate matrix and instrument block have the required ranks, that \(n>k+q\), and that \(SSR_R\) is at least \(SSR_U\), as it must be for nested least-squares regressions. A negative reduction in sum of squares usually signals that the models, samples, or reported quantities do not match.

The joint restriction is \(H_0:\pi_1=\cdots=\pi_q=0\), where the \(\pi_j\) are the coefficients on excluded instruments. It is not the restriction that the coefficients on \(W\) are zero, nor is it a first-stage test of whether instruments predict \(d\). The transformed outcome is constructed using the candidate structural coefficient; the AR test evaluates whether the instruments explain that transformed outcome after covariate adjustment.

A conventional IV Wald test estimates the IV coefficient and scales its distance from \(\beta_0\) by a standard error. Its usual approximation can be unreliable when instruments are weak. The AR test instead tests the null directly through the transformed-outcome regression, so its null reference distribution does not depend on a large first-stage coefficient. A first-stage strength statistic addresses instrument relevance, not whether a proposed structural coefficient is compatible with the instrument restrictions.

The exact F reference distribution above is not automatically appropriate under heteroskedasticity, clustering, dependence, or nonnormal finite-sample errors. In those settings, the conventional residual-variance F calculation may have the wrong size. The test also can have low power when instruments explain little variation after covariates are partialled out. Finally, failure to reject a candidate does not prove it is correct; it means the data do not provide sufficient evidence against it under the specified assumptions.

Common Pitfalls

  • Testing the covariates instead of the instruments. The AR restriction is on the excluded-instrument coefficients in the null-imposed regression. Covariates remain included and unrestricted.
  • Using different covariate adjustments. Both restricted and unrestricted regressions must contain the same \(W\), fitted on the same observations.
  • Assuming full rank guarantees an F statistic. Full rank does not ensure positive residual degrees of freedom. Require \(n>k+q\) as well.
  • Interpreting a non-significant result as proof. A large p-value is not the probability that the null is true and does not establish instrument validity or strong identification.
  • Using the homoskedastic F formula automatically. The stated exact reference needs the conditional normal, common-variance, uncorrelated-error assumptions; it is not a general solution for heteroskedastic or clustered errors.
Key takeaway: For an AR test with included covariates, transform the outcome using the candidate coefficient, keep all included covariates in both regressions, and test the excluded-instrument coefficients jointly. The exact \(F_{q,n-k-q}\) reference additionally requires full rank, \(n>k+q\), and the stated conditional error assumptions.

Check Your Understanding

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

  1. A test regression includes five covariates and three excluded instruments. Which coefficients are restricted under the AR null, and what are the unrestricted residual degrees of freedom for sample size \(n=50\)?
  2. Why are the covariates included in both the restricted and unrestricted regressions?
  3. For \(n=18\), \(k=4\), and \(q=2\), is the usual unrestricted-residual F statistic defined if the design has full rank?
  4. Does a non-rejection of \(H_0:\beta=\beta_0\) demonstrate that the instruments are valid? Explain.

Solutions. (1) The three excluded-instrument coefficients are jointly restricted to zero; the unrestricted residual degrees of freedom are \(50-5-3=42\). (2) They are included nuisance covariates in the structural specification, so the test must assess the added explanatory contribution of the instruments conditional on those covariates. (3) Yes: \(18-4-2=12>0\), provided the stated rank condition holds. (4) No. Non-rejection means the test does not find sufficient evidence against that candidate under its assumptions; validity of the instrument exclusion and exogeneity conditions is a substantive requirement, not established by this test.

Clinical Biostats