Performs bootstrap estimation procedures for the variance of the proportion of treatment effect explained, the omnibus test, and identifying a region above a treshold in a randomized treatment setting.
boot.var(data.control, data.treat, W.grid.expand, type, test = FALSE,
data.all = NULL, num.cov = NULL, results.for.test = NULL, threshold = NULL)A list is returned:
grid of variance estimates for the overall treatment effect, the residual treatment effect, and the proportion of treatment effect explained as a function of the baseline covariates, W. If requested by user, includes regions flagged above the threshold.
p-value(s) from the F test and the two step omnibus test for heterogeneity, depending on type argument.
dataframe containing data from the control group, specifically the outcome Y, the surrogate S, and the baseline covariates W
dataframe containing data from the treamtent group, specifically the outcome Y, the surrogate S, and the baseline covariates W
expanded version of the W grid of baseline covariates, where each row is a specific combination of the covariates for which the estimates should be provided
options are "model", "two step", or "both"; specifies the estimation method that should be used for the proportion of treatment effect explained
TRUE or FALSE, if test for heterogeneity is wanted
dataframe containing data from the control and treamtent groups, specifically the outcome Y, the surrogate S, and the baseline covariates W
number of baseline covariates in the matrix W
the grid of estimates for the proportion of treatment effect explained obtained prior to bootstrapping, needed for the omnibus test
threshold to flag regions where the estimated proportion of the treatment effect explained is at least that high