Usage
treatSens.BART(formula, trt.model = probitEM(), theta = 0.5, grid.dim = c(8, 4), standardize = TRUE, zero.loc = 1 / 3, verbose = FALSE, buffer = 0.0, est.type = "ATE", data = NULL, seed = 1234, nsim = 200, nthin = 10, nburn = 200, nthreads = NULL, spy.range = NULL, spz.range = NULL, trim.wt = 10, benchmarking = "2SD")
Arguments
formula
an object of class formula (or one that can be coerced to that class): a symbolic description of the model to be fitted.
trt.model
an assumed fitting technique for the treatment model. The default is probitEM(). Alternatives include probit() and bart(). See the 'Details' section for arguments to these functions.
theta
this option specifies the marginal probability that a binary unobserved confounder takes one, i.e. $Pr(U = 1)$. The default is 0.5.
grid.dim
the final dimensions of output grid. GLM.sens draws nsim of unobserved confounders and corresponding treatment effect estimates for each grid cell. The first argument specifies the horizontal (treatment) dimension, and the second argument specifies the vertical (response) dimension. The default is c(8, 4), that is, confounding effects are evaluated at 32 grid points. Note that the dimensions given will be increased by one to an odd number where necessary when zero.loc = "full" or sensitivity parameter ranges are given in order to force inclusion of 0 in the range of sensitivity parameters.
standardize
logical. If TRUE all variables except binary ones are standardized to have mean 0 and standard deviation 1.
zero.loc
A parameter used to automatically determine the range of each axis by specifying at what point along the y=x line the "treatment effect=0" contour will cross it. The parameter specifies the fraction of the length of the y=x line that this intersection occurs relative to the entire length of the line segment. The default is 1 / 3. No need to specify when spy.range and spz.range are specified.
verbose
logical. If TRUE, detailed messages are reported as the algorithm runs.
buffer
restriction to range of coefficients on U to ensure stability around the edges. This option is rarely used.
est.type
one of three causal estimads -- "ATE", "ATT", or "ATC". See Details for information on calculation of weights.
data
an optional data frame. If not found in data, the variables are taken from environment(formula), typically the environment from which bart is called.
nsim
number of simulated $U$s to generate (and hence to average over) per cell in grid.
nthin
number of BART tree draws to make per every draw of $U$.
nburn
number of draws of $U$ to make and throw away at the start of a run.
nthreads
number of CPU cores used for parallel processing. If NULL, defaults to a guess of the number of "logical" processing units available. This guess returns the correct number on the most commonly used systems.
spy.range
custom range for the sensitiviy parameter associated with Y (the coefficient on U in the outcome model or partial correlation of U with Y given X), e.g. c(0,2). When this option is specified, zetaz.range must be also specified and zero.loc will be overridden.
spz.range
custom range for the sensitivity parameter associated with Z (the coefficient on U in the treatment model or partial correlation of U with Z given X), e.g. c(-2,2). When this option is specified, zetay.range must be also specified and zero.loc will be overridden.
trim.wt
the maximum size of weight as a percentage of the sample size of the inferential group for the causal estimand. For example, trim.wt = 10 in a dataset with 300 treated observations when the estimand has been set to "ATT" gives a maximum weight of 30.
benchmarking
either "2SD" or "1SD". Used to determine the "marginal effects" corresponding to predictors for the plot, where the number of SD units given is the full spread, i.e. distance from below the mean to above.