ivmte1.4.0 package

Instrumental Variables: Extrapolation by Marginal Treatment Effects

piv

Obtaining IV-like estimands

polyparse

Parsing marginal treatment response formulas

polyProduct

Function to multiply polynomials

popmean

Calulating population mean

print.ivmte

Print results

altDefSplinesBasis

(Alternative) Defining single splines basis functions, with interactio...

argstring

Auxiliary function: extract arguments from function in string form

audit

Audit procedure

bound

Obtaining TE bounds

boundCI

Construct confidence intervals for treatment effects under partial ide...

boundPvalue

Construct p-values for treatment effects under partial identification

bX

Spline basis function of order 1

checkU

Check polynomial form of the u-term

classFormula

Auxiliary function: test if object is a formula

classList

Auxiliary function: test if object is a list

combinemonobound

Combining the boundedness and monotonicity constraint objects

constructConstant

Construct constant function

criterionMin

Minimizing violation of observational equivalence

design

Generating design matrices

extractcols

Auxiliary function: extracting columns by component names

fmtResult

Format result for display

funEval

Evaluate a particular function

genBasisSplines

Generate basis matrix for splines

genboundA

Generating the constraint matrix

gendist1

Generate test distribution 1

gendist1e

Generate test distribution 1 with errors

gendist2

Generate test distribution 2

gendist3

Generate test distribution 3

gendist3e

Generate test distribution 3 with errors

gendist4

Generate test distribution 4

gendist5e

Generate test distribution 5 (has errors and a covariate)

gendist6e

Generate test distribution 6 (has errors and a covariate)

gendistBasic

Generate basic data set for testing

gendistCovariates

Generate test data set with covariates

gendistMosquito

Generate mosquito data set

gendistSplines

Generate test data set with splines

genej

Auxiliary function: generating basis vectors

genGamma

Estimating expectations of terms in the MTR (gamma objects)

genGammaSplines

Generate Gamma moments for splines

genGammaSplinesTT

Generating the Gamma moments for splines, for 'testthat'

genGammaTT

Function to generate gamma moments for 'testthat'

gengrid

Generating the grid for the audit procedure

genmonoA

Generate components of the monotonicity constraints

genmonoboundA

Generating monotonicity and boundedness constraints

genSSet

Generating moments/data for IV-like estimands

genTarget

Generating target MTR moments

genWeight

Generating list of target weight functions

getXZ

Auxiliary function: extract X and Z covariates from a formula

gmmEstimate

GMM estimate of TE under point identification

interactSplines

Update splines object with list of interactions

isfunctionstring

Auxiliary function: check if string is command

ivEstimate

Obtaining IV-like specifications

ivmte

Instrumental Variables: Extrapolation by Marginal Treatment Effects

ivmteEstimate

Single iteration of estimation procedure from Mogstad, Torgovitsky, Sa...

l

Listing subsets and components

lpSetup

Constructing LP problem

lpSetupBound

Configure LP environment for obtaining the bounds

lpSetupCriterion

Configure LP environment for minimizing the criterion

lpSetupCriterionBoot

Configure LP environment for specification testing

lpSetupEqualCoef

Generate equality constraints

lpSetupInfeasible

Configure LP environment for diagnostics

lpSetupSolver

Configure LP environment to be compatible with solvers

magnitude

Check magnitude of real number

matrixTriplets

Convert matrix into triplet form

mInt

Function to generate integral of m0 and m1

modcall

Auxiliary function: modifying calls

momentMatrix

Construct pre-meaned moment matrix

monoIntegral

Integrating and evaluating monomials

negationCheck

Check if custom weights are negations of each other

olsj

OLS weights

optionsCplexAPI

Function to parse options for CPLEX

optionsCplexAPISingle

Function to parse a single set of options for CPLEX

optionsCplexAPITol

Function to extract feasibility tolerance from CPLEX options

optionsGurobi

Function to parse options for Gurobi

optionsLpSolveAPI

Function to parse options for lp_solve

optionsRmosek

Function to parse options for Gurobi

parenthBoolean

Correct boolean expressions in terms lists

permute

Auxiliary function: generate all permutations of a vector

permuteN

Auxiliary function: generate all permutation orderings

propensity

Estimating propensity scores

qpSetup

Constructing QCQP problem

qpSetupBound

Constructing QCQP problem for bounding

qpSetupCriterion

Configure QCQP problem to find minimum criterion

qpSetupInfeasible

Configure QP environment for diagnostics

removeSplines

Separating splines from MTR formulas

rescaleX

Function to implement rescaling procedure

restring

Auxiliary function that converts an expression of variable names into ...

rhalton

Generate Halton sequence

runCplexAPI

Running cplexAPI solver

runGurobi

Running Gurobi solver

runLpSolveAPI

Running lpSolveAPI

runMosek

Running Rmosek

selectViolations

Select points from audit grid to add to the constraint grid

sOls1d

IV-like weighting function, OLS specification 1

sOls2d

IV-like weighting function, OLS specification 2

sOls3

IV-like weighting function, OLS specification 3

sOlsSplines

IV-like weighting function, OLS specifications

splineInt

Integrating splines

splinesBasis

Evaluating splines basis functions

splineUpdate

Constructing higher order splines

statusString

Convert status code to string

sTsls

IV-like weighting function, TSLS specification

sTslsSplines

IV-like weighting function, TSLS specification

subsetclean

Auxiliary function: remove extraneous spaces

summary.ivmte

Summarize results

sWald

IV-like weighting function, Wald specification

symat

Generate symmetric matrix

tsls

TSLS weights, with controls

unstring

Auxiliary function that converts a vector of strings into an expressio...

uSplineBasis

Spline basis function

uSplineInt

Integrated splines

vecextract

Auxiliary function: extracting elements from strings

wate1

Target weight for ATE

watt1

Target weight for ATT

wAttSplines

Target weighting function, for ATT

watu1

Target weight for ATU

weights

Generating splines weights

wgenlate1

Target weight for generalized LATE

whichforlist

Auxiliary function: which for lists

wlate1

Target weight for LATE

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.

  • Maintainer: Joshua Shea
  • License: GPL-2 | GPL-3
  • Last published: 2021-09-17