Description Usage Arguments Value Examples
This function estimates the moment of each MTR term under the target weight.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
treat |
variable name for treatment indicator. The name can be provided with or without quotation marks. |
m0 |
one-sided formula for the marginal treatment response
function for the control group. Splines may also be
incorporated using the expression |
m1 |
one-sided formula for the marginal treatment response
function for the treated group. See |
target |
character, target parameter to be estimated. The
function allows for ATE ( |
target.weight0 |
user-defined 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 |
user-defined weight function for the treated
group defining the target parameter. See |
target.knots0 |
user-defined 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 |
user-defined set of functions defining the
knots associated with spline weights for the treated group. See
|
late.Z |
vector of variable names used to define the LATE. |
late.from |
baseline set of values of Z used to define the LATE. |
late.to |
comparison set of values of Z used to define the LATE. |
late.X |
vector of variable names of covariates to condition on when defining the LATE. |
eval.X |
numeric vector of the values to condition variables
in |
genlate.lb |
lower bound value of unobservable |
genlate.ub |
upper bound value of unobservable |
data |
|
splinesobj |
list of spline components in the MTRs for treated
and control groups. Spline terms are extracted using
|
pmodobj |
A vector of propensity scores. |
pm0 |
A list of the monomials in the MTR for d = 0. |
pm1 |
A list of the monomials in the MTR for d = 1. |
noisy |
boolean, default set to |
A list containing either the vectors of gamma moments for
D = 0
and D = 1
, or a matrix of individual gamma
values for D = 0
and D = 1
. Additoinally, two
vectors are returned. xindex0
and xindex1
list
the variables that interact with the unobservable u
in
m0
and m1
. uexporder0
and
uexporder1
lists the exponents of the unobservable
u
in each term it appears in.
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 | dtm <- ivmte:::gendistMosquito()
## Declare MTR functions
formula1 = ~ 1 + u
formula0 = ~ 1 + u
splinesList = list(removeSplines(formula0), removeSplines(formula1))
## Declare propensity score model
propensityObj <- propensity(formula = d ~ z,
data = dtm,
link = "linear")
## Construct MTR polynomials
polynomials0 <- polyparse(formula = formula0,
data = dtm,
uname = u,
as.function = FALSE)
polynomials1 <- polyparse(formula = formula0,
data = dtm,
uname = u,
as.function = FALSE)
## Generate target gamma moments
genTarget(treat = "d",
m0 = ~ 1 + u,
m1 = ~ 1 + u,
target = "atu",
data = dtm,
splinesobj = splinesList,
pmodobj = propensityObj,
pm0 = polynomials0,
pm1 = polynomials1)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.