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

A test for the well-specification of the linear instrumental variable model. The test is based on trying to predict the residuals of a two-stage least-squares regression using a random forest. Details can be found in Scheidegger, Londschien and Bühlmann (2025) "A residual prediction test for the well-specification of linear instrumental variable models" <doi:10.48550/arXiv.2506.12771>.

Getting started

Package details

AuthorCyrill Scheidegger [aut, cre, cph] (ORCID: <https://orcid.org/0009-0005-2851-1384>)
MaintainerCyrill Scheidegger <cyrill.scheidegger@stat.math.ethz.ch>
LicenseGPL (>= 3)
Version1.0.0
URL https://github.com/cyrillsch/RPIV
Package repositoryView on CRAN
Installation Install the latest version of this package by entering the following in R:
install.packages("RPIV")

Try the RPIV package in your browser

Any scripts or data that you put into this service are public.

RPIV documentation built on Nov. 5, 2025, 5:19 p.m.