# Define enroll rate
define_fail_rate(
duration = c(3, 100),
fail_rate = log(2) / c(9, 18),
hr = c(.9, .6),
dropout_rate = .001
)
# Define enroll rate with stratum
define_fail_rate(
stratum = c(rep("Low", 2), rep("High", 2)),
duration = 1,
fail_rate = c(.1, .2, .3, .4),
dropout_rate = .001,
hr = c(.9, .75, .8, .6)
)
Run the code above in your browser using DataLab