GWEAKIVTEST: Stata module providing robust test for weak instruments for 2SLS with multiple endogenous regressors
Daniel Lewis,
Karel Mertens and
Jonathan Shaw
Statistical Software Components from Boston College Department of Economics
Abstract:
gweakivtest implements the robust weak instruments test of Lewis and Mertens (2025). It is a postestimation command for ivreg2 and ivregress. gweakivtest tests the null hypothesis of weak instruments for two-stage least squares (2SLS) models with multiple endogenous regressors, generalizing existing bias-based tests for instrument strength in 2SLS models. Specifically, it (1) generalizes the bias-based tests for weak instrument of Stock and Yogo (2005) (developed under uniformly weak instruments) and Sanderson and Windmeijer (2016) (developed under a rank-deficient first-stage) to be robust to heteroskedasticity, autocorrelation and clustering (indeed, any form of covariance matrix), and (2) extends the Montiel Olea and Pflueger (2013) robust test for models with a single endogenous regressor (as implemented in weakivtest) to multiple endogenous regressors. Like that of Montiel Olea and Pflueger (2013), the test is based on a Nagar (1959) approximation of the bias of the 2SLS estimator.
Language: Stata
Requires: Stata version 16 and avar from SSC (q.v.)
Keywords: instrumental variables; weak instruments; 2SLS (search for similar items in EconPapers)
Date: 2026-02-23
Note: This module should be installed from within Stata by typing "ssc install gweakivtest". The module is made available under terms of the GPL v3 (https://www.gnu.org/licenses/gpl-3.0.txt). Windows users should not attempt to download these files with a web browser.
References: Add references at CitEc
Citations:
Downloads: (external link)
http://fmwww.bc.edu/repec/bocode/g/gweakivtest.ado program code (text/plain)
http://fmwww.bc.edu/repec/bocode/g/gweakivtest.sthlp help file (text/plain)
http://fmwww.bc.edu/repec/bocode/_/_lewis_mertens_crit_vals_linux.plugin binary plugin (application/octet-stream)
http://fmwww.bc.edu/repec/bocode/_/_lewis_mertens_crit_vals_mac.plugin binary plugin (application/octet-stream)
http://fmwww.bc.edu/repec/bocode/_/_lewis_mertens_crit_vals_win.plugin binary plugin (application/octet-stream)
Related works:
This item may be available elsewhere in EconPapers: Search for items with the same title.
Export reference: BibTeX
RIS (EndNote, ProCite, RefMan)
HTML/Text
Persistent link: https://EconPapers.repec.org/RePEc:boc:bocode:s459610
Ordering information: This software item can be ordered from
http://repec.org/docs/ssc.php
Access Statistics for this software item
More software in Statistical Software Components from Boston College Department of Economics Boston College, 140 Commonwealth Avenue, Chestnut Hill MA 02467 USA. Contact information at EDIRC.
Bibliographic data for series maintained by Christopher F Baum ().