# Instrumental Variables: Extrapolation by Marginal Treatment Effects

## Documentation for package ‘ivmte’ version 1.4.0

- DESCRIPTION file.
- User guides, package vignettes and other documentation.

## Help Pages

A B C D E F G I L M N O P Q R S T U V W

## -- A --

AE | Angrist Evans Data
altDefSplinesBasis | (Alternative) Defining single splines basis functions, with interactions
argstring | Auxiliary function: extract arguments from function in string form
audit | Audit procedure

## -- B --

bound | Obtaining TE bounds
boundCI | Construct confidence intervals for treatment effects under partial identification
boundPvalue | Construct p-values for treatment effects under partial identification
bX | Spline basis function of order 1

## -- C --

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

## -- D --

design | Generating design matrices

## -- E --

extractcols | Auxiliary function: extracting columns by component names

## -- F --

fmtResult | Format result for display
funEval | Evaluate a particular function

## -- G --

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

## -- I --

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, Santos (2018)
ivmteSimData | ivmte Simulated Data

## -- L --

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

## -- M --

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

## -- N --

negationCheck | Check if custom weights are negations of each other

## -- O --

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

## -- P --

parenthBoolean | Correct boolean expressions in terms lists
permute | Auxiliary function: generate all permutations of a vector
permuteN | Auxiliary function: generate all permutation orderings
piv | Obtaining IV-like estimands
polyparse | Parsing marginal treatment response formulas
polyProduct | Function to multiply polynomials
popmean | Calulating population mean
print.ivmte | Print results
propensity | Estimating propensity scores

## -- Q --

qpSetup | Constructing QCQP problem
qpSetupBound | Constructing QCQP problem for bounding
qpSetupCriterion | Configure QCQP problem to find minimum criterion
qpSetupInfeasible | Configure QP environment for diagnostics

## -- R --

removeSplines | Separating splines from MTR formulas
rescaleX | Function to implement rescaling procedure
restring | Auxiliary function that converts an expression of variable names into a vector of strings.
rhalton | Generate Halton sequence
runCplexAPI | Running cplexAPI solver
runGurobi | Running Gurobi solver
runLpSolveAPI | Running lpSolveAPI
runMosek | Running Rmosek

## -- S --

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

## -- T --

tsls | TSLS weights, with controls

## -- U --

unstring | Auxiliary function that converts a vector of strings into an expression containing variable names.
uSplineBasis | Spline basis function
uSplineInt | Integrated splines

## -- V --

vecextract | Auxiliary function: extracting elements from strings

## -- W --

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