Estimates bootstrap variance for counterfactual survival functions from
surv_weibull(). Supports binary and multiple treatment groups.
var_surv_weibull_bootstrap(
data,
surv_result,
treatment_var,
time_var,
event_var,
censoring_formula,
censoring_control = list(maxiter = 350),
B = 100,
parallel = FALSE,
mc.cores = 2,
seed = NULL,
boot_level = "full"
)List containing:
Matrix [time x group] of bootstrap variances.
Matrix [time x group] of bootstrap standard errors.
List of length B with survival matrices from each iteration.
Matrix [B x group] of sample sizes for each group in each bootstrap iteration.
Matrix [time x group] of successful iterations.
Matrix [time x group] of failed iterations.
Total bootstrap iterations.
Data frame used in original surv_weibull() call.
Output from surv_weibull().
Name of treatment variable.
Name of time variable.
Name of event indicator variable.
Formula for censoring score model.
Control parameters for survreg().
Default list(maxiter = 350).
Number of bootstrap iterations. Default 100.
Logical. If TRUE, use parallel computation via mclapply.
Default FALSE.
Number of cores for parallel computation. Default 2.
Optional random seed for reproducibility. Ensures identical results across runs and between sequential and parallel execution. Default NULL.
Bootstrap sampling level: "full" (default) or "strata". "full" resamples from entire dataset (observational studies). "strata" resamples within treatment groups preserving group sizes (RCTs).
Each bootstrap iteration resamples observations with replacement and re-estimates propensity scores, weights, and survival functions using the same specifications as the original analysis. Treatment groups may fail independently if not sampled or if models fail to converge.