Usage
PSAboot(Tr, Y, X, M = 100, formu =
as.formula(paste0("treat ~ ", paste0(names(X), collapse
= " + "))), control.ratio = 5, control.sample.size =
min(control.ratio * min(table(Tr)), max(table(Tr))),
control.replace = TRUE, treated.sample.size =
min(table(Tr)), treated.replace = TRUE, methods =
c(Stratification = boot.strata, ctree = boot.ctree,
rpart = boot.rpart, Matching = boot.matching, MatchIt =
boot.matchit), parallel = TRUE, seed = NULL, ...)Arguments
Tr
numeric (0 or 1) or logical vector of treatment
indicators.
Y
vector of outcome varaible.
X
matrix or data frame of covariates used to
estimate the propensity scores.
M
number of bootstrap samples to generate.
formu
formula used for estimating propensity
scores. The default is to use all covariates in
X.
control.ratio
the ratio of control units to sample
relative to the treatment units.
control.sample.size
the size of each bootstrap
sample of control units.
control.replace
whether to use replacement when
sampling from control units.
treated.sample.size
the size of each bootstrap
sample of treatment units. The default uses all treatment
units for each boostrap sample.
treated.replace
whether to use replacement when
sampling from treated units.
methods
a named vector of functions for each PSA
method to use.
seed
random seed. Each iteration, i, will use a
seed of seed + i.
parallel
whether to run the bootstrap samples in
parallel.