
Montiel Olea-Pflueger effective F test for weak instruments
Source:R/iv_weak.R
morie_iv_montiel_olea_pflueger.RdThe weak-instrument test of Montiel Olea and Pflueger (2013) for one endogenous regressor, robust to heteroskedasticity, clustering and serial correlation. After partialling out the included exogenous regressors and the constant, the instruments are orthonormalised (\(Z'Z = nI\)) and $$F_{eff} = \frac{Y_2' P_Z Y_2}{tr(\hat W_2)},$$ where \(\hat W_2\) is the (robust, clustered or HAC) variance of \(n^{-1/2}\sum_i Z_i v_{2i}\) from the first stage, with the \(n/(n-K-L-1)\) degrees-of-freedom correction. Under homoskedasticity \(F_{eff}\) is the ordinary first-stage F.
Arguments
- data
A
data.frame(or tibble) holding the outcome, endogenous regressors, instruments, and any exogenous controls.- outcome
Outcome column (needed for the generalized TSLS/LIML bounds).
- endogenous
Character vector; column names of the endogenous regressors.
- instruments
Character vector; column names of the instrumental variables.
- exogenous
Optional character vector of additional exogenous regressors included in both the structural equation and the first stage.
NULL(default) for a just-identified design.- vcov
"robust"(default),"iid","cluster"or"hac"(Bartlett kernel).- cluster
Cluster column for
vcov = "cluster".- lag
HAC truncation lag (default \(\lfloor 4(n/100)^{2/9} \rfloor\)).
- alpha
Test size (default 0.05).
- tau
Worst-case bias thresholds (default 5, 10, 20 and 30 percent).
Value
A list with F_eff, critical_values (a data frame:
tau, simplified, tsls, liml and the matching
effective degrees of freedom), B_tsls, B_liml, reject
(logical per tau, generalized TSLS), n, K,
vcov and alpha.
Details
The null hypothesis is that the Nagar bias exceeds a fraction \(\tau\) of a worst-case benchmark. Critical values come from the Patnaik approximation of the noncentral chi-square: \(x = 1/\tau\) for the simplified (conservative) test, \(x = B/\tau\) with the estimated worst-case bias bound \(B\) for the generalized TSLS and LIML tests. Everything is computed from the data; no table is consulted. Reject weak instruments when \(F_{eff}\) exceeds the critical value.
References
Montiel Olea, J. L. and Pflueger, C. (2013). A robust test for weak instruments. Journal of Business and Economic Statistics 31(3), 358-369. Pflueger, C. E. and Wang, S. (2015). A robust test for weak instruments in Stata. Stata Journal 15(1), 216-225.
Examples
set.seed(2)
n <- 500
z1 <- rnorm(n); z2 <- rnorm(n); u <- rnorm(n)
d <- 0.3 * z1 + 0.2 * z2 + u * (1 + abs(z1)) / 2
y <- 0.5 * d + u + rnorm(n)
mop <- morie_iv_montiel_olea_pflueger(data.frame(y, d, z1, z2), "y", "d",
c("z1", "z2"))
mop$F_eff
#> [1] 25.86756
mop$critical_values
#> tau simplified tsls liml K_eff_simplified K_eff_tsls K_eff_liml
#> 1 0.05 34.20340 16.246226 25.480348 1.498554 1.509354 1.501449
#> 2 0.10 20.68086 10.685707 15.871738 1.504430 1.524469 1.509940
#> 3 0.20 13.19218 7.481602 10.472346 1.515506 1.550328 1.525519
#> 4 0.30 10.42457 6.259983 8.451557 1.525762 1.571639 1.539470