The hardware and bandwidth for this mirror is donated by dogado GmbH, the Webhosting and Full Service-Cloud Provider. Check out our Wordpress Tutorial.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]dogado.de.

RPIV: Residual Prediction Tests for Well-Specification of Instrumental Variable Models

Two tests for the well-specification of the linear instrumental variable model. The first test is based on trying to predict the residuals of a two-stage least-squares regression using a random forest. The second test is robust to weak-identification and based on trying to predict the residuals for a particular candidate parameter and can also be used to construct confidence sets with an Anderson-Rubin-type inversion. Details can be found in Scheidegger, Londschien and Bühlmann (2025) "Machine-learning-powered specification testing in linear instrumental variable models" <doi:10.48550/arXiv.2506.12771>.

Version: 1.1.0
Imports: ranger, stats
Suggests: testthat (≥ 3.0.0)
Published: 2026-03-24
DOI: 10.32614/CRAN.package.RPIV
Author: Cyrill Scheidegger ORCID iD [aut, cre, cph]
Maintainer: Cyrill Scheidegger <cyrill.scheidegger at stat.math.ethz.ch>
License: GPL (≥ 3)
URL: https://github.com/cyrillsch/RPIV
NeedsCompilation: no
Materials: README, NEWS
CRAN checks: RPIV results

Documentation:

Reference manual: RPIV.html , RPIV.pdf

Downloads:

Package source: RPIV_1.1.0.tar.gz
Windows binaries: r-devel: RPIV_1.1.0.zip, r-release: RPIV_1.1.0.zip, r-oldrel: RPIV_1.1.0.zip
macOS binaries: r-release (arm64): RPIV_1.1.0.tgz, r-oldrel (arm64): RPIV_1.0.0.tgz, r-release (x86_64): RPIV_1.1.0.tgz, r-oldrel (x86_64): RPIV_1.1.0.tgz
Old sources: RPIV archive

Linking:

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

These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.
Health stats visible at Monitor.