Description Usage Arguments Details Value Examples
This function provides a general framework for using the marginal treatment effect (MTE) to extrapolate. The model is the same binary treatment instrumental variable (IV) model considered by Imbens and Angrist (1994) (doi: 10.2307/2951620) and Heckman and Vytlacil (2005) (doi: 10.1111/j.14680262.2005.00594.x). The framework on which this function is based was developed by Mogstad, Santos and Torgovitsky (2018) (doi: 10.3982/ECTA15463). See also the recent survey paper on extrapolation in IV models by Mogstad and Torgovitsky (2018) (doi: 10.1146/annureveconomics101617041813). A detailed description of the module and its features can be found in Shea and Torgovitsky (2021).
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66  ivmte(
data,
target,
late.from,
late.to,
late.X,
genlate.lb,
genlate.ub,
target.weight0 = NULL,
target.weight1 = NULL,
target.knots0 = NULL,
target.knots1 = NULL,
m0,
m1,
uname = u,
m1.ub,
m0.ub,
m1.lb,
m0.lb,
mte.ub,
mte.lb,
m0.dec,
m0.inc,
m1.dec,
m1.inc,
mte.dec,
mte.inc,
equal.coef,
ivlike,
components,
subset,
propensity,
link = "logit",
treat,
outcome,
solver,
solver.options,
solver.presolve,
solver.options.criterion,
solver.options.bounds,
lpsolver,
lpsolver.options,
lpsolver.presolve,
lpsolver.options.criterion,
lpsolver.options.bounds,
criterion.tol = 1e04,
initgrid.nx = 20,
initgrid.nu = 20,
audit.nx = 2500,
audit.nu = 25,
audit.add = 100,
audit.max = 25,
audit.tol,
rescale,
point,
point.eyeweight = FALSE,
bootstraps = 0,
bootstraps.m,
bootstraps.replace = TRUE,
levels = c(0.99, 0.95, 0.9),
ci.type = "backward",
specification.test = TRUE,
noisy = FALSE,
smallreturnlist = FALSE,
debug = FALSE
)

data 

target 
character, target parameter to be estimated. The
function allows for ATE ( 
late.from 
a named vector or a list declaring the baseline values of Z used to define the LATE. The name associated with each value should be the name of the corresponding variable. 
late.to 
a named vector or a list declaring the comparison set of values of Z used to define the LATE. The name associated with each value should be the name of the corresponding variable. 
late.X 
a named vector or a list declaring the values to condition on. The name associated with each value should be the name of the corresponding variable. 
genlate.lb 
lower bound value of unobservable 
genlate.ub 
upper bound value of unobservable 
target.weight0 
userdefined weight function for the control
group defining the target parameter. A list of functions can be
submitted if the weighting function is in fact a spline. The
arguments of the function should be variable names in

target.weight1 
userdefined weight function for the treated
group defining the target parameter. See 
target.knots0 
userdefined set of functions defining the
knots associated with spline weights for the control group. The
arguments of the function should consist only of variable names
in 
target.knots1 
userdefined set of functions defining the
knots associated with spline weights for the treated group. See

m0 
onesided formula for the marginal treatment response
function for the control group. Splines may also be
incorporated using the expression 
m1 
onesided formula for the marginal treatment response
function for the treated group. See 
uname 
variable name for the unobservable used in declaring the MTRs. The name can be provided with or without quotation marks. 
m1.ub 
numeric value for upper bound on MTR for the treated group. By default, this will be set to the largest value of the observed outcome in the estimation sample. 
m0.ub 
numeric value for upper bound on MTR for the control group. By default, this will be set to the largest value of the observed outcome in the estimation sample. 
m1.lb 
numeric value for lower bound on MTR for the treated group. By default, this will be set to the smallest value of the observed outcome in the estimation sample. 
m0.lb 
numeric value for lower bound on MTR for the control group. By default, this will be set to the smallest value of the observed outcome in the estimation sample. 
mte.ub 
numeric value for upper bound on treatment effect parameter of interest. 
mte.lb 
numeric value for lower bound on treatment effect parameter of interest. 
m0.dec 
logical, set to 
m0.inc 
logical, set to 
m1.dec 
logical, set to 
m1.inc 
logical, set to 
mte.dec 
logical, set to 
mte.inc 
logical, set to 
equal.coef 
onesided formula to indicate which terms in

ivlike 
formula or vector of formulas specifying the
regressions for the IVlike estimands. Which coefficients to
use to define the constraints determining the treatment effect
bounds (alternatively, the moments determining the treatment
effect point estimate) can be selected in the argument

components 
a list of vectors of the terms in the regression
specifications to include in the set of IVlike estimands. No
terms should be in quotes. To select the intercept term,
include the name 
subset 
a single subset condition or list of subset
conditions corresponding to each regression specified in

propensity 
formula or variable name corresponding to
propensity to take up treatment. If a formula is declared, then
the function estimates the propensity score according to the
formula and link specified in 
link 
character, name of link function to estimate propensity
score. Can be chosen from 
treat 
variable name for treatment indicator. The name can be provided with or without quotation marks. 
outcome 
variable name for outcome variable. The name can be provided with or without quotation marks. 
solver 
character, name of the programming package in R used
to obtain the bounds on the treatment effect. The function
supports 
solver.options 
list, each item of the list should correspond to an option specific to the solver selected. 
solver.presolve 
boolean, default set to 
solver.options.criterion 
list, each item of the list should correspond to an option specific to the solver selected. These options are specific for finding the minimum criterion. 
solver.options.bounds 
list, each item of the list should correspond to an option specific to the solver selected. These options are specific for finding the bounds. 
lpsolver 
character, deprecated argument for 
lpsolver.options 
list, deprecated argument for

lpsolver.presolve 
boolean, deprecated argument for

lpsolver.options.criterion 
list, deprecated argument for

lpsolver.options.bounds 
list, deprecated argument for

criterion.tol 
tolerance for the criterion function, and is
set to 1e4 by default. The criterion measures how well the
IVlike moments/conditional means are matched using the
l1norm. Statistical noise may prohibit the theoretical LP/QCQP
problem from being feasible. That is, there may not exist a set
of MTR coefficients that are able to match all the specified
moments. The function thus first estimates the minimum
criterion, which is reported in the output under the name
'minimum criterion', with a criterion of 0 meaning that all
moments were able to be matched. The function then relaxes the
constraints by tolerating a criterion up to 
initgrid.nx 
integer determining the number of points of the covariates used to form the initial constraint grid for imposing shape restrictions on the MTRs. 
initgrid.nu 
integer determining the number of points in the
open interval (0, 1) drawn from a Halton sequence. The end
points 0 and 1 are additionally included. These points are
always a subset of the points defining the audit grid (see

audit.nx 
integer determining the number of points on the covariates space to audit in each iteration of the audit procedure. 
audit.nu 
integer determining the number of points in the
open interval (0, 1) drawn from a Halton sequence. The end
points 0 and 1 are additionally included. These points are used
to audit whether the shape restrictions on the 
audit.add 
maximum number of points to add to the initial
constraint grid for imposing each kind of shape constraint. For
example, if there are 5 different kinds of shape constraints,
there can be at most 
audit.max 
maximum number of iterations in the audit procedure. 
audit.tol 
feasibility tolerance when performing the
audit. By default to set to be 1e06, which is equal to the
default feasibility tolerances of Gurobi ( 
rescale 
boolean, set to 
point 
boolean. Set to 
point.eyeweight 
boolean, default set to 
bootstraps 
integer, default set to 0. This determines the number of bootstraps used to perform statistical inference. 
bootstraps.m 
integer, default set to size of data
set. Determines the size of the subsample drawn from the
original data set when performing inference via the
bootstrap. This option applies only to the case of constructing
confidence intervals for treatment effect bounds, i.e. it does
not apply when 
bootstraps.replace 
boolean, default set to 
levels 
vector of real numbers between 0 and 1. Values correspond to the level of the confidence intervals constructed via bootstrap. 
ci.type 
character, default set to 
specification.test 
boolean, default set to

noisy 
boolean, default set to 
smallreturnlist 
boolean, default set to 
debug 
boolean, indicates whether or not the function should
provide output when obtaining bounds. The option is only
applied when 
When the function is used to estimate bounds, and statistical inference is not performed, the function returns the following objects.
the number of audits required until there were no more violations; or the number of audits performed before the audit procedure was terminated.
the minimum criterion.
a list containing the points used to define the audit grid, as well as a table of points where the shape constraints were violated.
a vector with the estimated lower and upper bounds of the target treatment effect.
a list containing all the model specifications and call options generating the results.
a list containing the estimate of the weighted means
for each component in the MTRs. The weights are determined by the
target parameter declared in target
, or the weights defined
by target.weight1
, target.knots1
,
target.weight0
, target.knots0
.
a list containing the coefficients on the treated and control group MTRs.
a list containing the target weights used to
estimate gstar
.
a list containing the LP/QCQP model, and the full output from solving the problem.
the solver used in estimation.
the number of elements in the Sset used to generate achieve (partial) identification.
the propensity score model. If a variable is fed
to the propensity
argument when calling ivmte
, then
the returned object is a list containing the name of variable given
by the user, and the values of that variable used in estimation.
a list of all the coefficient estimates and weights corresponding to each element in the Sset.
a list including the specifications of each spline declared in each MTR.
a vector of character strings logging the output of the estimation procedure.
If bootstraps
is greater than 0, then statistical inference
will be performed and the output will additionally contain the
following objects.
the number of bootstraps.
the number of bootstraps that failed (e.g. due to collinearity) and had to be repeated.
the estimates of the bounds from every bootstrap draw.
forward and/or backward confidence intervals for
the bound estimates at the levels specified in levels
.
bootstrap standard errors on the lower and upper bound estimates.
pvalue for the estimated bounds. pvalues are constructed by finding the level at which the confidence interval no longer contains 0.
confidence interval for coefficient estimates of the propensity score model.
standard errors for the coefficient estimates of the propensity score model.
pvalue from a specification test. The specification test is only performed if the minimum criterion is not 0.
If point = TRUE
and bootstraps = 0
, then point
estimation is performed using twostep GMM. The output will contain
the following objects.
test statistic and results from the asymptotic Jtest.
a vector. Each element is the GMM criterion for each moment condition used in estimation.
coefficient estimates for the MTRs.
point estimate of the treatment effect.
indexes for the moment conditions (i.e. elements in the S set) that were linearly independent and could be dropped.
If point = TRUE
and bootstraps
is not 0, then
point estimation is performed using twostep GMM, and additional
statistical inference is performed using the bootstrap samples.
The output will contain the following additional objects.
the number of bootstraps.
the number of bootstraps that failed (e.g. due to collinearity) and had to be repeated.
test statistic and result from the Jtest performed using the bootstrap samples.
Jtest statistic from each bootstrap.
coefficient estimates for the MTRs from each bootstrap sample. These are used to construct the confidence intervals and standard errors for the MTR coefficients.
confidence intervals for each MTR coefficient.
standard errors for each MTR coefficient estimate.
pvalue for the treatment effect point estimate estimated using the bootstrap.
treatment effect point estimate from each bootstrap sample. These are used to construct the confidence interval, standard error, and pvalue for the treatment effect.
confidence interval for the treatment effect.
standard error for the treatment effect estimate.
confidence interval for the coefficients in the propensity score model, constructed using the bootstrap.
standard errors for the coefficient estimates of the propensity score model.
Returns a list of results from throughout the estimation procedure. This includes all IVlike estimands; the propensity score model; bounds on the treatment effect; the estimated expectations of each term in the MTRs; the components and results of the LP/QCQP problem.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22  dtm < ivmte:::gendistMosquito()
ivlikespecs < c(ey ~ d  z,
ey ~ d  factor(z),
ey ~ d,
ey ~ d  factor(z))
jvec < l(d, d, d, d)
svec < l(, , , z %in% c(2, 4))
ivmte(ivlike = ivlikespecs,
data = dtm,
components = jvec,
propensity = d ~ z,
subset = svec,
m0 = ~ u + I(u ^ 2),
m1 = ~ u + I(u ^ 2),
uname = u,
target = "att",
m0.dec = TRUE,
m1.dec = TRUE,
bootstraps = 0,
solver = "lpSolveAPI")

Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.