ivreg2r: Extended Instrumental Variables Estimation with Diagnostics

Comprehensive instrumental variables and GMM estimation with automatic diagnostics, inspired by the 'Stata' command 'ivreg2' of Baum, Schaffer, and Stillman (2003) <doi:10.1177/1536867X0300300101> and Baum, Schaffer, and Stillman (2007) <doi:10.1177/1536867X0800700402>. Supports 2SLS, LIML, Fuller, k-class, two-step efficient GMM, and continuously-updated (CUE) estimators. Provides classical, robust, cluster-robust, HAC, and Driscoll-Kraay standard errors. Reports weak identification, underidentification, overidentification, and endogeneity tests at estimation time. All outputs are verified against 'Stata' within tight numerical tolerances.

Version: 0.1.0
Depends: R (≥ 4.4.0)
Imports: Formula, generics, stats, tibble
Suggests: dplyr, ivreg, knitr, modelsummary, rmarkdown, sandwich, testthat (≥ 3.1.5), tidyr
Published: 2026-07-21
DOI: 10.32614/CRAN.package.ivreg2r (may not be active yet)
Author: Francis DiTraglia [aut, cre], Christopher F. Baum [ctb, cph] (Author of the Stata ivreg2 program from which ivreg2r is adapted), Mark E. Schaffer [ctb, cph] (Author of the Stata ivreg2 program from which ivreg2r is adapted), Steven Stillman [ctb, cph] (Author of the Stata ivreg2 program from which ivreg2r is adapted)
Maintainer: Francis DiTraglia <francis.ditraglia at economics.ox.ac.uk>
BugReports: https://github.com/restatr/ivreg2r/issues
License: GPL-3
Copyright: Adapted from the Stata package 'ivreg2' by Christopher F Baum, Mark E Schaffer, and Steven Stillman, distributed under GPL-3. Component-level provenance for the adapted code and the bundled datasets is in inst/COPYRIGHTS.
ivreg2r copyright details
URL: https://restatr.com/ivreg2r/, https://github.com/restatr/ivreg2r
NeedsCompilation: no
Language: en-US
Citation: ivreg2r citation info
Materials: README, NEWS
CRAN checks: ivreg2r results

Documentation:

Reference manual: ivreg2r.html , ivreg2r.pdf
Vignettes: Advanced IV Estimation with ivreg2r (source, R code)
Instrumental Variables Estimation with ivreg2r (source, R code)
Time Series IV, Panel VCE, and GMM (source, R code)

Downloads:

Package source: ivreg2r_0.1.0.tar.gz
Windows binaries: r-devel: not available, r-release: not available, r-oldrel: not available
macOS binaries: r-release (arm64): ivreg2r_0.1.0.tgz, r-oldrel (arm64): ivreg2r_0.1.0.tgz, r-release (x86_64): ivreg2r_0.1.0.tgz, r-oldrel (x86_64): not available

Linking:

Please use the canonical form https://CRAN.R-project.org/package=ivreg2r to link to this page.