Skip to contents

Single 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, optionally gamma_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 i uses seed * 10000 + i.

Value

A one-row data frame with column Z.