55### New functions
66
77* ` generate_aft_dgm_flex() ` — general data-generating model (DGM) builder.
8- Replaces the GBSG-specific ` create_gbsg_dgm() ` as the primary DGM
9- constructor. Accepts any survival dataset and fits an accelerated failure
10- time (AFT) super-population model with user-specified treatment effect
11- heterogeneity parameters .
8+ Accepts any survival dataset and fits an accelerated failure time (AFT)
9+ super-population model with user-specified treatment effect heterogeneity
10+ parameters. This is the recommended starting point when building a DGM
11+ based on a dataset other than GBSG .
1212
1313* ` simulate_from_dgm() ` — general simulator for drawing trial replicates from
14- an ` aft_dgm_flex ` DGM. Replaces ` simulate_from_gbsg_dgm() ` . Column names
15- in the returned data frame use underscore notation (` y_sim ` , ` event_sim ` ,
16- ` treat_sim ` , ` flag_harm ` ).
14+ an ` aft_dgm_flex ` DGM. Supersedes ` simulate_from_gbsg_dgm() ` for new code.
15+ Column names in the returned data frame use underscore notation (` y_sim ` ,
16+ ` event_sim ` , ` treat_sim ` , ` flag_harm ` ).
1717
1818* ` run_simulation_analysis() ` (general version) — simulation wrapper that
1919 calls ` simulate_from_dgm() ` and accepts explicit column-name parameters,
20- making it applicable to any DGM built with ` generate_aft_dgm_flex() ` . The
21- GBSG dataset is now one application of this general pipeline rather than a
22- separate code path.
23-
24- * ` setup_gbsg_dgm() ` — convenience bridge function. Wraps
25- ` create_gbsg_dgm() ` (see Deprecated below) and reshapes its output to the
26- ` aft_dgm_flex ` class expected by ` simulate_from_dgm() ` and
27- ` run_simulation_analysis() ` . Existing GBSG-based simulation scripts can
28- adopt the general pipeline with a one-line change:
20+ making it applicable to any DGM built with ` generate_aft_dgm_flex() ` or
21+ ` setup_gbsg_dgm() ` . The GBSG dataset is one application of this general
22+ pipeline rather than a separate code path.
23+
24+ * ` setup_gbsg_dgm() ` — the recommended entry point for all GBSG-based
25+ simulation work. Encodes the data preparation and subgroup definition from
26+ León et al. (2024) and returns an ` aft_dgm_flex ` -compatible object accepted
27+ by ` simulate_from_dgm() ` and ` run_simulation_analysis() ` . Existing scripts
28+ using ` create_gbsg_dgm() ` can migrate with a one-line change:
2929 ` dgm <- setup_gbsg_dgm(model = "alt", k_inter = k, seed = seed) ` .
3030
31- ### Deprecated functions
31+ ### Superseded functions
3232
33- The following functions are retained and fully functional but will be removed
34- in a future version. Each emits a deprecation warning on first call with a
35- concrete migration example.
33+ ` create_gbsg_dgm() ` is superseded by ` setup_gbsg_dgm() ` . It remains fully
34+ functional and continues to produce correct results; no existing GBSG
35+ simulation scripts need to change. The distinction is that ` setup_gbsg_dgm() `
36+ returns an object of class ` c("aft_dgm_flex", "gbsg_dgm") ` compatible with
37+ the general pipeline, whereas ` create_gbsg_dgm() ` returns only ` "gbsg_dgm" ` .
38+ A ` .Deprecated() ` signal is emitted to encourage migration in new code.
3639
37- * ` create_gbsg_dgm() ` → use ` generate_aft_dgm_flex() ` or ` setup_gbsg_dgm() ` .
38-
39- * ` simulate_from_gbsg_dgm() ` → use ` simulate_from_dgm(analysis_time = Inf) ` .
40- Note: the new function defaults to ` analysis_time = 48 ` (staggered-entry
41- administrative censoring); pass ` analysis_time = Inf ` to match the legacy
42- ` max_follow = Inf ` behaviour. Column names in the result also change — see
43- the mapping table below.
40+ ` simulate_from_gbsg_dgm() ` is superseded by ` simulate_from_dgm() ` for new
41+ code. Column names in the output change from dot-notation to underscore
42+ notation — see the mapping table below. Pass ` analysis_time = Inf ` to match
43+ the legacy ` max_follow = Inf ` behaviour.
4444
4545 | Legacy column | General column |
4646 | ---------------| ----------------|
@@ -49,13 +49,13 @@ concrete migration example.
4949 | ` treat ` | ` treat_sim ` |
5050 | ` flag.harm ` | ` flag_harm ` |
5151
52- ### Deprecated parameters
52+ ### Superseded parameters
5353
5454* ` run_simulation_analysis(max_follow) ` → use ` analysis_time ` . If supplied,
55- ` max_follow ` is silently forwarded to ` analysis_time ` with a warning.
55+ ` max_follow ` is forwarded to ` analysis_time ` with a warning.
5656
5757* ` run_simulation_analysis(muC_adj) ` → use ` cens_adjust ` . If supplied,
58- ` muC_adj ` is silently forwarded to ` cens_adjust ` with a warning.
58+ ` muC_adj ` is forwarded to ` cens_adjust ` with a warning.
5959
6060### Bug fixes
6161
@@ -92,9 +92,9 @@ migration. All affected code paths were exercised by GBSG factor variables
9292
9393* ` create_gbsg_dgm() ` and ` simulate_from_gbsg_dgm() ` are now thin public
9494 wrappers that call ` .create_gbsg_dgm_() ` and ` .simulate_from_gbsg_dgm_() `
95- internally. This prevents deprecation- warning spam in functions that call
96- these internally in loops or binary searches (` calibrate_k_inter() ` ,
97- ` get_dgm_with_output() ` , ` validate_k_inter_effect() ` ).
95+ internally. This prevents warning spam in functions that call these
96+ in loops or binary searches (` calibrate_k_inter() ` , ` get_dgm_with_output ()` ,
97+ ` validate_k_inter_effect() ` ).
9898
9999* ` compute_dgm_cde() ` now resolves the super-population data frame from
100100 ` dgm$df_super_rand ` (GBSG DGMs) or ` dgm$df_super ` (general ` aft_dgm_flex `
0 commit comments