Simulate one interim dataset and compute Z at the futility look
single_matched_futility_rep.RdSingle replicate used by calibrate_matched_futility_boundary:
simulates one trial under a fixed data-generating scenario, censors it at
ceiling(futility_IF * total_events) events, and returns the test
statistic from survival_test (positive Z favours treatment).
Usage
single_matched_futility_rep(
i,
n_c,
n_t,
data_generating_model,
recruitment_model,
futility_IF,
total_events,
analysis_model,
seed = NULL
)Arguments
- i
Replicate index (used with
seed).- n_c, n_t
Number of patients in the control / treatment group.
- data_generating_model
True scenario:
lambda_c,delay_time,post_delay_HR, optionallygamma_c.- recruitment_model
Recruitment specification (see
add_recruitment_time).- futility_IF
Information fraction of the futility look.
- total_events
Maximum planned number of events.
- analysis_model
Analysis specification (see
survival_test).- seed
Optional integer seed; replicate
iusesseed * 10000 + i.