twostepweakiv is a Stata module that implements the two-step weak-instrument-robust confidence sets based on Andrews (2018) and the refined projection method for subvector inference based on Chaudhuri and Zivot (2011) for linear instrumental-variable (IV) models. There is an accompanying Stata Journal article that provides an overview on these methods and includes details for using twostepweakiv in Stata.
To install a stable version of twostepweakiv, open Stata and run:
ssc install twostepweakiv
Note that twostepweakiv requires at least Stata 11.2 and avar, ivreg2, moremata, ranktest from SSC (q.v.)
Development versions are available on GitHub.
Sun, Liyang. (2018). Implementing valid two-step identification-robust confidence sets for linear instrumental-variables models. Stata Journal 18(4), 803–825.