Tests for Instrumental Variable Validity
Overview
Implements tests for the identifying assumptions of instrumental variable models, the local exclusion restriction and monotonicity conditions required for local average treatment effect identification. Covers Kitagawa (2015) doi:10.3982/ECTA11974, Mourifie and Wan (2017) doi:10.1162/REST_a_00622, and Frandsen, Lefgren, and Leslie (2023) doi:10.1257/aer.20201860. Includes a one-shot wrapper that runs all applicable tests on a fitted instrumental variable model. Dispatches on 'fixest' and 'ivreg' model objects.
Bug fix (behaviour change)
iv_kitagawa()dispatched on a fittedfixestorivregmodel with exogenous controls used to silently drop the controls and return the unconditional test. This was wrong when validity is only conditional on X. The fitted-model methods now error and direct the user toiv_mw()for the conditional Mourifie-Wan (2017) test, or to the raw-vector default method to force an unconditional test on the same data.iv_check()now filters its applicable-tests list by the presence and dimensionality of exogenous controls. Kitagawa is dropped when any control is present; Mourifie-Wan is dropped when more than one control is present (multivariate X is planned for v0.2.0 via a tensor-product series basis). When a test is dropped,iv_check()emits an informational message explaining why.
Show all changes in 0.1.2Hide the rest of the changes in 0.1.2
iv_check()no longer falls back to running Mourifie-Wan unconditionally when handed a model with multivariate controls. That downgrade was the same silent-drop bug as the Kitagawa one.
Documentation
vignette("with-fixest")rewritten to demonstrate the new behaviour: the unconditional case, the single-control conditional path throughiv_mw(), and the multivariate workaround (propensity-index dimension reduction).
From NEWS.md in the release
Install
Health
- OK13 OK2026-08-05
- NOTE12 OK, 1 NOTE2026-08-01
- OK6 OK2026-04-23
Documentation
- Help pages
- 12 (1 internal)includes a package overview page
- Examples that run
- 17%1 run in a plain check · 5 only when donttest examples are enabled (R CMD check --as-cran)
- Exported functions with examples
- 100%
- Documented parameters
- 93%
- Return-value docs
- 100%
- Help pages citing references
- 33%
Downloads
Repository
Stars over time
Commits over time
8 development-tooling and community-health practices detected across 5 families in the upstream repository
Checks run against github.com/charlescoverdale/ivcheck on 2026-10-21.
GitHub Pages site last deployed 2026-09-19 · The repository has a site deploy workflow
pkgdown site last built 2026-09-19
Show all practicesHide 1 practice
Dependencies
Code & Tests
Datasets
People & History
Pick two releases to compare their code metrics.
- 0.1.2Latest
- RR 4.6.0 released · 2026-04-24
- 0.1.12026-04-22
- RR 4.5.0 released · 2025-04-11
Package metadata
- First published
- 2026-04-22
- Total releases
- 2 / 1 yrs
- License
- MIT + file LICENSE OSI
- Minimum R
- ≥ 4.1.0
- Bundled data
- 15 KB / 1 file
- Download size
- 173 KB
Cite
Cite this package
Run in R for the authors' entry:
citation("ivcheck")The package provides a citation file, so citation() returns the authors' own entry.
It points to 10.3982/ecta11974, 10.1162/rest_a_00622, 10.1257/aer.20201860, 10.2307/2951620.
Cite the R Observatory
For a number measured here: a download total, a coverage figure, an archival date.
From data release v2026-10-23, which the citation names so these numbers can be found later. More on citing and the projects behind them.