Instrumental Variables: Extrapolation by Marginal Treatment Effects
Overview
The marginal treatment effect was introduced by Heckman and Vytlacil (2005) doi:10.1111/j.1468-0262.2005.00594.x to provide a choice-theoretic interpretation to instrumental variables models that maintain the monotonicity condition of Imbens and Angrist (1994) doi:10.2307/2951620. This interpretation can be used to extrapolate from the compliers to estimate treatment effects for other subpopulations. This package provides a flexible set of methods for conducting this extrapolation. It allows for parametric or nonparametric sieve estimation, and allows the user to maintain shape restrictions such as monotonicity. The package operates in the general framework developed by Mogstad, Santos and Torgovitsky (2018) doi:10.3982/ECTA15463, and accommodates either point identification or partial identification (bounds). In the partially identified case, bounds are computed using either linear programming or quadratically constrained quadratic programming. Support for four solvers is provided. Gurobi and the Gurobi R API can be obtained from http://www.gurobi.com/index. CPLEX can be obtained from https://www.ibm.com/analytics/cplex-optimizer. CPLEX R APIs 'Rcplex' and 'cplexAPI' are available from CRAN. MOSEK and the MOSEK R API can be obtained from https://www.mosek.com/. The lp_solve library is freely available from http://lpsolve.sourceforge.net/5.5/, and is included when installing its API 'lpSolveAPI', which is available from CRAN.
Install
Health
NOTERd filesr-devel-linux-x86_64-debian-clang, r-devel-linux-x86_64-debian-gcc, r-devel-linux-x86_64-fedora-clang, r-devel-linux-x86_64-fedora-gcc, r-devel-windows-x86_64, r-oldrel-macos-arm64, r-oldrel-macos-x86_64, r-oldrel-windows-x86_64, r-patched-linux-x86_64, r-release-linux-x86_64, r-release-macos-arm64, r-release-macos-x86_64, r-release-windows-x86_64
checkRd: (-1) sTsls.Rd:17: Lost braces; missing escapes or markup?
17 | \item{pi}{the matrix E[XZ']E[ZZ']^{-1}}
| ^
checkRd: (-1) sTslsSplines.Rd:20: Lost braces; missing escapes or markup?
20 | \item{pi}{matrix, corresponds to E[XZ']E[ZZ']^{-1}, the first stage
| ^- NOTE13 NOTENow
- NOTE14 NOTE2026-03-30
- ERROR13 NOTE, 1 ERROR2026-03-10
Documentation
- Help pages
- 122
- Examples that run
- 100%19 run in a plain check
- Exported functions with examples
- 50%
- Documented parameters
- 100%
- Return-value docs
- 97%
- Help pages citing references
- 0%
Downloads
Dependencies
Code & Tests
Datasets
People & History
Pick two releases to compare their code metrics.
- RR 4.6.0 released · 2026-04-24
- RR 4.5.0 released · 2025-04-11
- RR 4.4.0 released · 2024-04-24
- RR 4.3.0 released · 2023-04-21
- RR 4.2.0 released · 2022-04-22
- 1.4.0Latest2021-09-17 · current release · diff ↗ ·
added 5 exports
optionsRmosek, qpSetup, qpSetupBound, qpSetupCriterion, qpSetupInfeasible - RR 4.1.0 released · 2021-05-18
- RR 4.0.0 released · 2020-04-24
- 1.2.02020-04-18 · diff ↗ ·
removed 1 export
obsEqMinadded 11 exports
criterionMin, interactSplines, lpSetupBound, lpSetupCriterion, lpSetupCriterionBoot, lpSetupInfeasible, lpSetupSolver, optionsCplexAPI, optionsGurobi, optionsLpSolveAPI, rhalton - 1.1.02019-12-02 · diff ↗
- 1.0.1
- RR 3.6.0 released · 2019-04-26
- 1.0.02019-02-08
- RR 3.5.0 released · 2018-04-23
Package metadata
- First published
- 2019-02-08
- Total releases
- 5 / 7 yrs
- License
- GPL-2 | GPL-3 OSI
- Minimum R
- ≥ 3.6.0
- Bundled data
- 307 KB / 2 files
- Download size
- 1.0 MB
Cite
Cite this package
Run in R for the authors' preferred citation:
citation("ivmte")This package has no citation file, so citation() returns this entry built from DESCRIPTION.
Cite the R Observatory
For a number measured here: a download total, a coverage figure, an archival date.
From data release v2026-10-24, which the citation names so these numbers can be found later. More on citing and the projects behind them.