Estimates bootstrap variance for counterfactual survival functions from
surv_cox(). Supports binary and multiple treatment groups.
var_surv_cox_bootstrap(
data,
surv_result,
treatment_var,
time_var,
event_var,
censoring_formula,
censoring_control = list(),
ties = "efron",
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_cox() call.
Output from surv_cox().
Name of treatment variable.
Name of time variable.
Name of event indicator variable.
Formula for censoring score model.
Control parameters for coxph().
Default list().
Tie handling method for Cox model. Default "efron".
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) samples from entire dataset, "strata" samples within each treatment group preserving group sizes.
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.