Function for computing the confidence intervals in the DiSCo method using the bootstrap approach described in
DiSCo_CI(
redraw,
controls,
target,
T_max,
T0,
grid,
mc.cores = 1,
evgrid = seq(from = 0, to = 1, length.out = 1001),
qmethod = NULL,
qtype = 7,
M = 1000,
mixture = FALSE,
simplex = FALSE,
replace = TRUE
)
A list with the following components
weights
The bootstrapped weights
disco_boot
A list containing the bootstrapped counterfactuals,
with the following elements, each of which contains named elements called upper
and lower
which are G x T matrices where G is the specified number of grid points and T is the number of time periods
Integer indicating the current bootstrap redraw
A list containing the raw data for the control group
A list containing the raw data for the target group
Index of last time period
Index of the last pre-treatment period
Grid to recompute the CDF on if mixture
option is chosen
Number of cores to use for parallelization
Character, indicating the method to use for computing the quantiles of the target distribution. The default is NULL, which uses the quantile
function from the stats package.
Other options are "qkden
" (based on smoothed kernel density function) and "extreme
" (based on parametric extreme value distributions).
Both are substantially slower than the default method but may be useful for fat-tailed distributions with few data points at the upper quantiles. Alternatively, one could use the q_max option to restrict the range of quantiles used.
Integer, indicating the type of quantile to compute when using quantile
in the qmethod
argument.
The default 7. See the documentation for the quantile
function for more information.
Integer indicating the number of control quantiles to use in the DiSCo method. Default is 1000.
Logical, indicating whether to use the mixture of distributions approach instead.
See Section 4.3. in gunsilius2023distributional;textualDiSCos. This approach minimizes the distance between the CDFs
instead of the quantile functions, and is preferred for categorical variables. When working with such variables, one should
also provide a list of support points in the grid.cat
parameter. When that is provided, this parameter is automatically set to TRUE. Default is FALSE.
Logical, indicating whether to use to constrain the optimal weights to the unit simplex. Default is FALSE, which only constrains the weights to sum up to 1 but allows them to be negative.
Logical, indicating whether to sample with replacement when computing the bootstrap samples. Default is TRUE.