Skip to content

Update sim_fix_n with a similar interface as sim_gs_n #256

@LittleBeannie

Description

@LittleBeannie

The sim_gs_n function provides a very convenient way to simulate group sequential designs:

sim_gs_n(
  n_sim = ..., sample_size = ..., block = ...,
  stratum = ..., enroll_rate = ..., fail_rate = ...,
  test = ..., cut = ..., ...)

The test = ... argument specifies the testing methods, which can include options such as the (weighted) logrank test, RMST, etc. The cut = ... argument allows values from a create_cut() object, enabling many cutting strategies.

In contrast, the sim_fixed_n function may not have that convenient and flexible API. For example, the rho_gamma = ... argument specifies the testing, which only allows for weighted logrank test with FH weights, and it does not support other testing methods, such as RMST. Additionally, the total_duration = ..., target_event = ..., timing_type = 1:5 arguments specify the cutting, but only five cutting strategies are supported. In comparison, create_cut provides more than five cutting options.

sim_fixed_n(
  n_sim = ..., sample_size = ..., , block = ...,
  stratum = ..., enroll_rate = ..., fail_rate = ...,
  total_duration = ..., target_event = ..., timing_type = 1:5,
  rho_gamma = ...)

We plan to enhance sim_fixed_n to have a similar API to sim_gs_n, allowing users greater flexibility in testing and cutting strategies. In other words, we would like to have

sim_fixed_n(
  n_sim = ..., sample_size = ..., , block = ...,
  stratum = ..., enroll_rate = ..., fail_rate = ...,
  test= ...,  # either wlr, rmst, milestone 
  cut = ... # an object by create_cut
)

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions