Orchestrates bootstrap analysis for ForestSearch using doFuture parallelization. Implements bias correction methods to adjust for optimism in subgroup selection.
forestsearch_bootstrap_dofuture(
fs.est,
nb_boots,
seed = 8316951L,
details = FALSE,
show_three = FALSE,
parallel_args = list()
)List with the following components:
Data.table with bias-corrected estimates for each bootstrap iteration
List of confidence intervals for H and Hc (raw and bias-corrected)
Formatted table of subgroup estimates
Matrix (nb_boots x n) of bootstrap sample indicators
Detailed estimates for subgroup H
Detailed estimates for subgroup Hc
(If create_summary=TRUE) Enhanced summary with tables and diagnostics
List. ForestSearch results object from forestsearch.
Must contain df.est (data frame) and args_call_all (list of arguments).
Integer. Number of bootstrap samples (recommend 500-1000).
Integer. Random seed for reproducibility of bootstrap sample
generation. Default 8316951L. The value is passed to both
bootstrap_ystar (which constructs the \(n \times B\)
bootstrap index matrix) and bootstrap_results (which
re-runs the ForestSearch algorithm on each replicate); both calls must
use the same seed to ensure bootstrap index alignment. Set to
NULL for a non-reproducible run.
Logical. If TRUE, prints detailed progress information.
Default: FALSE.
Logical. If TRUE, shows verbose output for first 3
bootstrap iterations for debugging. Default: FALSE.
List. Parallelization configuration with elements:
plan: Character. One of "multisession", "multicore", "callr",
or "sequential"
workers: Integer. Number of parallel workers
show_message: Logical. Show parallel setup messages
If empty list, inherits settings from original forestsearch call.
Two bias correction approaches are implemented:
Method 1 (Simple Optimism): $$H_{adj1} = H_{obs} - (H^*_{*} - H^*_{obs})$$ where \(H^*_{*}\) is the new subgroup HR on bootstrap data and \(H^*_{obs}\) is the new subgroup HR on original data.
Method 2 (Double Bootstrap): $$H_{adj2} = 2 \times H_{obs} - (H_{*} + H^*_{*} - H^*_{obs})$$ where \(H_{*}\) is the original subgroup HR on bootstrap data.
H: Original subgroup (harm/questionable, treat.recommend == 0)
Hc: Complement subgroup (recommend, treat.recommend == 1)
_obs: Estimate from original data
_star: Estimate from bootstrap data
_biasadj_1: Bias correction method 1
_biasadj_2: Bias correction method 2
Typical runtime: 1-5 seconds per bootstrap iteration. For 1000 bootstraps with 6 workers, expect 3-10 minutes total. Memory usage scales with dataset size and number of workers.
Original fs.est must have identified a valid subgroup
Requires packages: data.table, foreach, doFuture,
survival
For plots: requires ggplot2
forestsearch for initial subgroup identification
bootstrap_results for the core bootstrap worker function
build_cox_formula for Cox formula construction
fit_cox_models for Cox model fitting