Skip to content

ivmte

Instrumental Variables: Extrapolation by Marginal Treatment Effects

v1.4.0 · Sep 17, 2021 · GPL-2 | GPL-3

Description

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.

Downloads

276

Last 30 days

11208th

276

Last 90 days

276

Last year

CRAN Check Status

1 ERROR
13 NOTE
Show all 14 flavors
Flavor Status
r-devel-linux-x86_64-debian-clang NOTE
r-devel-linux-x86_64-debian-gcc NOTE
r-devel-linux-x86_64-fedora-clang NOTE
r-devel-linux-x86_64-fedora-gcc NOTE
r-devel-macos-arm64 ERROR
r-devel-windows-x86_64 NOTE
r-oldrel-macos-arm64 NOTE
r-oldrel-macos-x86_64 NOTE
r-oldrel-windows-x86_64 NOTE
r-patched-linux-x86_64 NOTE
r-release-linux-x86_64 NOTE
r-release-macos-arm64 NOTE
r-release-macos-x86_64 NOTE
r-release-windows-x86_64 NOTE
Check details (18 non-OK)
NOTE r-devel-linux-x86_64-debian-clang

Rd files

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
       |                                               ^
NOTE r-devel-linux-x86_64-debian-gcc

Rd files

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
       |                                               ^
NOTE r-devel-linux-x86_64-fedora-clang

Rd files

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
       |                                               ^
NOTE r-devel-linux-x86_64-fedora-gcc

Rd files

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
       |                                               ^
NOTE r-devel-macos-arm64

Rd files

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
       |                                               ^
ERROR r-devel-macos-arm64

re-building of vignette outputs

Error(s) in re-building vignettes:
--- re-building ‘ivmte.Rmd’ using rmarkdown

Quitting from ivmte.Rmd:330-342 [bounds]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
<error/rlang_error>
Error in `if (x$audit.count == 1) ...`:
! argument is of length zero
---
Backtrace:
    ▆
 1. ├─base::withVisible(knit_print(x, ...))
 2. ├─knitr::knit_print(x, ...)
 3. └─knitr:::knit_print.default(x, ...)
 4.   └─knitr::normal_print(x)
 5.     ├─base::print(x)
 6.     └─ivmte:::print.ivmte(x)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Error: processing vignette 'ivmte.Rmd' failed with diagnostics:
argument is of length zero
--- failed re-building ‘ivmte.Rmd’

SUMMARY: processing the following file failed:
  ‘ivmte.Rmd’

Error: Vignette re-building failed.
Execution halted
NOTE r-devel-windows-x86_64

Rd files

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
       |                                               ^
NOTE r-oldrel-macos-arm64

Rd files

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
       |                                               ^
NOTE r-oldrel-macos-arm64

package dependencies

Packages suggested but not available for checking: 'gurobi', 'cplexAPI'
NOTE r-oldrel-macos-x86_64

Rd files

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
       |                                               ^
NOTE r-oldrel-macos-x86_64

package dependencies

Packages suggested but not available for checking: 'gurobi', 'cplexAPI'
NOTE r-oldrel-windows-x86_64

Rd files

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
       |                                               ^
NOTE r-oldrel-windows-x86_64

package dependencies

Packages suggested but not available for checking: 'gurobi', 'cplexAPI'
NOTE r-patched-linux-x86_64

Rd files

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
       |                                               ^
NOTE r-release-linux-x86_64

Rd files

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
       |                                               ^
NOTE r-release-macos-arm64

Rd files

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
       |                                               ^
NOTE r-release-macos-x86_64

Rd files

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
       |                                               ^
NOTE r-release-windows-x86_64

Rd files

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
       |                                               ^

Check History

ERROR 0 OK · 13 NOTE · 0 WARNING · 1 ERROR · 0 FAILURE Mar 9, 2026
NOTE r-devel-linux-x86_64-debian-clang

Rd files

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
       |                                               ^
NOTE r-devel-linux-x86_64-debian-gcc

Rd files

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
       |                                               ^
NOTE r-devel-linux-x86_64-fedora-clang

Rd files

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
       |                                               ^
NOTE r-devel-linux-x86_64-fedora-gcc

Rd files

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
       |                                               ^
ERROR r-devel-macos-arm64

Rd files

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
       |                                               ^
NOTE r-devel-windows-x86_64

Rd files

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
       |                                               ^
NOTE r-patched-linux-x86_64

Rd files

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
       |                                               ^
NOTE r-release-linux-x86_64

Rd files

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
       |                                               ^
NOTE r-release-macos-arm64

Rd files

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
       |                                               ^
NOTE r-release-macos-x86_64

Rd files

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
       |                                               ^
NOTE r-release-windows-x86_64

Rd files

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
       |                                               ^
NOTE r-oldrel-macos-arm64

package dependencies

Packages suggested but not available for checking: 'gurobi', 'cplexAPI'
NOTE r-oldrel-macos-x86_64

package dependencies

Packages suggested but not available for checking: 'gurobi', 'cplexAPI'
NOTE r-oldrel-windows-x86_64

package dependencies

Packages suggested but not available for checking: 'gurobi', 'cplexAPI'

Dependency Network

Dependencies Reverse dependencies Formula ivmte

Version History

new 1.4.0 Mar 10, 2026