create_cut {simtrial}R Documentation

Create a cutting function

Description

Create a cutting function for use with sim_gs_n()

Usage

create_cut(...)

Arguments

...

Arguments passed to get_analysis_date()

Value

A function that accepts a data frame of simulated trial data and returns a cut date

See Also

get_analysis_date(), sim_gs_n()

Examples

# Simulate trial data
trial_data <- sim_pw_surv()

# Create a cutting function that applies the following 2 conditions:
# - At least 45 months have passed since the start of the study
# - At least 300 events have occurred
cutting <- create_cut(
  planned_calendar_time = 45,
  target_event_overall = 350
)

# Cut the trial data
cutting(trial_data)

[Package simtrial version 0.4.1 Index]