View source: R/A03-bootstrap-variance.R
| var_surv_weibull_bootstrap | R Documentation |
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"
)
data |
Data frame used in original |
surv_result |
Output from |
treatment_var |
Name of treatment variable. |
time_var |
Name of time variable. |
event_var |
Name of event indicator variable. |
censoring_formula |
Formula for censoring score model. |
censoring_control |
Control parameters for |
B |
Number of bootstrap iterations. Default 100. |
parallel |
Logical. If TRUE, use parallel computation via |
mc.cores |
Number of cores for parallel computation. Default 2. |
seed |
Optional random seed for reproducibility. Ensures identical results across runs and between sequential and parallel execution. Default NULL. |
boot_level |
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.
List containing:
var_matrix |
Matrix [time x group] of bootstrap variances. |
se_matrix |
Matrix [time x group] of bootstrap standard errors. |
boot_samples |
List of length B with survival matrices from each iteration. |
boot_allocation |
Matrix [B x group] of sample sizes for each group in each bootstrap iteration. |
n_success_by_group |
Matrix [time x group] of successful iterations. |
n_failed_by_group |
Matrix [time x group] of failed iterations. |
B |
Total bootstrap iterations. |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.