library(gsDesign2)
# Default arguments, simple output (total event count only)
expected_event()
# Event count by time period
expected_event(simple = FALSE)
# Early cutoff
expected_event(total_duration = .5)
# Single time period example
expected_event(
enroll_rate = define_enroll_rate(duration = 10, rate = 10),
fail_rate = define_fail_rate(duration = 100, fail_rate = log(2) / 6, dropout_rate = .01),
total_duration = 22,
simple = FALSE
)
# Single time period example, multiple enrollment periods
expected_event(
enroll_rate = define_enroll_rate(duration = c(5, 5), rate = c(10, 20)),
fail_rate = define_fail_rate(duration = 100, fail_rate = log(2) / 6, dropout_rate = .01),
total_duration = 22, simple = FALSE
)
Run the code above in your browser using DataLab