*! version 1.0.0 07sep2013

help for weakivtest

Weak instrument test for TSLS and LIML

Syntax

weakivtest [, level(#) eps(#) n2(#)]

Description

weakivtest implements the weak instrument test of Montiel Olea and Pflueger (2013). It is a postestimation command for ivreg2 and ivregress.

weakivtest tests the null hypothesis of weak instruments for both Two-Stage Least Squares (TSLS) and Limited Information Maximum Likelihood (LIML) with one single endogenous regressor. The test rejects the null hypothesis when the effective F statistic exceeds a critical value, which depends on the estimator (TSLS or LIML), the significance level, and the desired weak instrument threshold tau. weakivtest extends the Stock and Yogo (2005) weak instrument tests available in ivreg2 and in the ivregress postestimation command estat firststage.

Note: You must install avar by typing "ssc install avar" before running weakivtest.

Options

level(#) specifies the confidence level. The default is level(0.05).

eps(#) specifies the input parameter for the Nelder-Mead optimization technique; default is eps(1e-3).

n2(#) specifies the denominator degrees of freedom for the inverse non-central F distribution. Set n2(#) to a large positive number to approximate an inverse non-central chi-squared distribution; default is n2(1e7).

weakivtest estimates the variance-covariance matrix of errors as specified in the preceding ivreg2 or ivregress command. The following options are supported:

robust estimates an Eicker-Huber-White heteroskedasticity robust variance-covariance matrix.

cluster(varname) estimates a variance-covariance matrix clustered by the specified variable.

robust bw(#) (for ivreg2) estimates a heteroskedasticity and autocorrelation-consistent variance-covariance matrix computed with a Bartlett (Newey-West) kernel with # bandwidth.

bw(#) without the robust option (for ivreg2) requests estimates that are autocorrelation-consistent but not heteroskedasticity-consistent.

vce (hac nw #) (for ivregress) estimates a heteroskedasticity and autocorrelation-consistent variance-covariance matrix computed with a Newey-West kernel with number of lags #.

Examples

Change webuse URL

. webuse set http://fmwww.bc.edu/repec/bocode/d

Load Yogo (2004) data

. webuse Data_USAQ.dta, clear

Reset URL to the default

. webuse set, clear

. gsort date

. tsset quarter

Baseline example - robust Bartlett (Newey-West) kernel with bandwidth 7 .

. ivreg2 dc (rrf=z1 z2 z3 z4), robust bw(7)

. weakivtest

Implement weakivtest as a postestimation command for ivregress.

. ivregress 2sls dc (rrf=z1 z2 z3 z4), vce(hac nw 6)

. weakivtest

Load National Longitudinal Survey data

. webuse nlswork, clear

Implement weakivtest as a postestimation command for ivreg2 in IV regressions with fixed effects.

. ivreg2 ln_w (ttl=age) grade collgrad i.year , ffirst cluster(idcode)

. weakivtest

Implement weakivtest as a postestimation command for reghdfe in IV regressions with fixed effects.

. reghdfe ln_w grade collgrad (ttl=age) , ffirst absorb(year) cluster(idcode) old stage(first)

. weakivtest

Implement weakivtest as a postestimation command for ivreghdfe in IV regressions with fixed effects.

. ivreghdfe ln_w (ttl=age) grade collgrad, first absorb(year) cluster(idcode)

. weakivtest

Saved results

weakivtest saves the following results in r():

Scalars

r(N) Number of Observations
r(K) Number of Instruments
r(n2) Denominator degrees of freedom non-central F
r(level) Test Significance Level
r(eps) Optimization Parameter
r(F_eff) Effective F Statistic

r(c_TSLS_5) TSLS Critical Value for tau=5%
r(c_TSLS_10) TSLS Critical Value for tau=10%
r(c_TSLS_20) TSLS Critical Value for tau=20%
r(c_TSLS_30) TSLS Critical Value for tau=30%

r(c_LIML_5) LIML Critical Value for tau=5%
r(c_LIML_10) LIML Critical Value for tau=10%
r(c_LIML_20) LIML Critical Value for tau=20%
r(c_LIML_30) LIML Critical Value for tau=30%

r(c_simp_5) TSLS Simplified Conservative Critical Value for tau=5%
r(c_simp_10) TSLS Simplified Conservative Critical Value for tau=10%
r(c_simp_20) TSLS Simplified Conservative Critical Value for tau=20%
r(c_simp_30) TSLS Simplified Conservative Critical Value for tau=30%

r(x_TSLS_5) TSLS Non-Centrality Parameter for tau=5%
r(x_TSLS_10) TSLS Non-Centrality Parameter for tau=10%
r(x_TSLS_20) TSLS Non-Centrality Parameter for tau=20%
r(x_TSLS_30) TSLS Non-Centrality Parameter for tau=30%

r(K_eff_TSLS_5) TSLS Effective Degrees of Freedom for tau=5%
r(K_eff_TSLS_10) TSLS Effective Degrees of Freedom for tau=10%
r(K_eff_TSLS_20) TSLS Effective Degrees of Freedom for tau=20%
r(K_eff_TSLS_30) TSLS Effective Degrees of Freedom for tau=30%

r(x_LIML_5) LIML Non-Centrality Parameter for tau=5%
r(x_LIML_10) LIML Non-Centrality Parameter for tau=10%
r(x_LIML_20) LIML Non-Centrality Parameter for tau=20%
r(x_LIML_30) LIML Non-Centrality Parameter for tau=30%

r(K_eff_LIML_5) LIML Effective Degrees of Freedom for tau=5%
r(K_eff_LIML_10) LIML Effective Degrees of Freedom for tau=10%
r(K_eff_LIML_20) LIML Effective Degrees of Freedom for tau=20%
r(K_eff_LIML_30) LIML Effective Degrees of Freedom for tau=30%

r(x_simp_5) TSLS Simplified Non-Centrality Parameter for tau=5%
r(x_simp_10) TSLS Simplified Non-Centrality Parameter for tau=10%
r(x_simp_20) TSLS Simplified Non-Centrality Parameter for tau=20%
r(x_simp_30) TSLS Simplified Non-Centrality Parameter for tau=30%

r(K_eff_simp_5) TSLS Simplified Effective Degrees of Freedom for tau=5%
r(K_eff_simp_10) TSLS Simplified Effective Degrees of Freedom for tau=10%
r(K_eff_simp_20) TSLS Simplified Effective Degrees of Freedom for tau=20%
r(K_eff_simp_30) TSLS Simplified Effective Degrees of Freedom for tau=30%

References

Baum, C. F., M. E. Schaffer, and S. Stillman. 2007. Enhanced routines for instrumental variables/generalized method of moments and testing. Stata Journal 7:465-506.

Baum, C. F., M. E. Schaffer, and S. Stillman. 2010. IVREG2: Stata module for extended instrumental variables/2SLS and GMM estimation. http://ideas.repec.org/c/boc/bocode/s425401.html.

Campbell, J. Y. 2003. Consumption-based asset pricing. Handbook of the Economics of Finance, Vol. 1 803-887.

Montiel Olea, J. L. and C. E. Pflueger. 2013. A robust test for weak instruments. Journal of Business and Economic Statistics 31:358-369.

Pflueger, C. E. and Su Wang. 2013. A robust test for weak instruments in Stata. http://papers.ssrn.com/sol3/papers.cfm?abstract_id=2323012.

Newey, W. and K. D. West. 1987. A simple, positive semi-definite, heteroskedasticity and
autocorrelation consistent covariance matrix. Econometrica 55:703-708.

Stock, J. and M. Yogo. 2005. Testing for weak instruments in linear IV regression. In Identification and Inference for Econometric Models: Essays in Honor of Thomas Rothenberg Chapter 5 80-108.

Yogo, M. 2004. Estimating the elasticity of intertemporal substitution when instruments
are weak. Review of Economics and Statistics 86:797-810.

Authors

Carolin E. Pflueger, University of Chicago, Chicago IL, 60637, cpflueger@uchicago.edu

Su Wang, ShanghaiTech University, Shanghai, 201210, China, wangsu@shanghaitech.edu.cn

The package is currently maintained by Carolin Pflueger, Su Wang and Luis Yepez (luisyepezsa@uchicago.edu).

We thank Peter Hull for pointing out and fixing an error with the weights. We thank Johannes Stroebel and Drew Johnston for help with reghdfe.
All remaining errors are our own.

Also see

ivregress, ivreg,
ivregress_postestimation, ivreg2, reghdfe, ivreghdfe (if installed), avar (if installed)