Generates simulated clinical trial data from a GBSG-based data generating mechanism.
simulate_from_gbsg_dgm(
dgm,
n = NULL,
rand_ratio = 1,
sim_id = 1,
max_follow = Inf,
muC_adj = 0,
min_cens = NULL,
max_cens = NULL,
draw_treatment = TRUE
)Data frame with simulated trial data including:
Subject identifier
Observed follow-up time
Event indicator (1 = event, 0 = censored)
True event time (before censoring)
Treatment indicator
Harm subgroup indicator
Individual log hazard ratio (potential outcome)
Analysis factors
A "gbsg_dgm" object from create_gbsg_dgm
Integer. Sample size. If NULL, uses full super-population. Default: NULL
Numeric. Randomization ratio (treatment:control). Default: 1 (1:1 randomization)
Integer. Simulation ID used for seed offset. Default: 1
Numeric. Administrative censoring time (months). Default: Inf (no administrative censoring)
Numeric. Adjustment to censoring distribution location parameter. Positive values increase censoring. Default: 0
Numeric. Minimum censoring time for uniform censoring. Required if cens_type = "uniform"
Numeric. Maximum censoring time for uniform censoring. Required if cens_type = "uniform"
Logical. If TRUE, randomly assigns treatment. If FALSE, samples from existing treatment arms. Default: TRUE