General replacement for the legacy run_simulation_analysis() that
was coupled to simulate_from_gbsg_dgm() and GBSG-specific column
names. This version calls simulate_from_dgm and accepts
explicit column-name parameters, making it applicable to any DGM built
with generate_aft_dgm_flex.
run_simulation_analysis(
sim_id,
dgm,
n_sample,
analysis_time = Inf,
cens_adjust = 0,
max_follow = NULL,
muC_adj = NULL,
confounders_base = c("v1", "v2", "v3", "v4", "v5", "v6", "v7"),
n_add_noise = 0L,
outcome_name = "y_sim",
event_name = "event_sim",
treat_name = "treat_sim",
harm_col = "flag_harm",
run_fs = TRUE,
run_fs_grf = TRUE,
run_grf = TRUE,
fs_params = list(),
grf_params = list(),
cox_formula = NULL,
cox_formula_adj = NULL,
n_sims_total = NULL,
seed_base = 8316951L,
verbose = FALSE,
verbose_n = NULL,
debug = FALSE
)A data.table with one row per analysis method, containing
subgroup size, HR, AHR, CDE, and classification metrics.
Integer. Simulation replicate index (used as seed offset).
An "aft_dgm_flex" object from
generate_aft_dgm_flex or setup_gbsg_dgm.
Integer. Per-replicate sample size.
Numeric. Calendar time of analysis on the DGM time
scale. Use Inf (default) for no administrative censoring —
equivalent to the legacy max_follow = Inf.
Numeric. Log-scale shift to censoring times passed to
simulate_from_dgm(cens_adjust = ...). Replaces legacy
muC_adj. Default 0.
Deprecated. Use analysis_time instead.
If supplied, its value is forwarded to analysis_time with a
warning. Retained for backward compatibility with legacy scripts.
Deprecated. Use cens_adjust instead.
If supplied, its value is forwarded to cens_adjust with a
warning. Retained for backward compatibility with legacy scripts.
Character vector of base confounder names.
Integer. Number of independent N(0,1) noise variables
to append. Default 0L.
Name of the observed time column in simulated data.
Default "y_sim".
Name of the event indicator column. Default
"event_sim".
Name of the treatment column. Default "treat_sim".
Name of the true-subgroup indicator column. Default
"flag_harm".
Logical. Run ForestSearch (LASSO). Default TRUE.
Logical. Run ForestSearch (LASSO + GRF). Default
TRUE.
Logical. Run standalone GRF. Default TRUE.
Named list of ForestSearch parameter overrides.
Named list of GRF parameter overrides.
Optional Cox formula for unadjusted ITT.
Optional adjusted Cox formula.
Integer. Total simulations (for progress messages).
Integer. Base seed; replicate seed = seed_base +
sim_id. Default 8316951L.
Logical. Print progress messages. Default FALSE.
Integer. If set, only print for sim_id <=
verbose_n. Default NULL.
Logical. Print detailed debug output. Default FALSE.
simulate_from_dgm,
generate_aft_dgm_flex, setup_gbsg_dgm