Description Usage Arguments Value
View source: R/three_piece_sim.R
three_piece_sim
Simulate survival data: three-piece exponential vs. three-piece exponential.
1 2 3 4 5 | three_piece_sim(n_c = 100, n_e = 100, rec_period = 12,
rec_power = 1, rate_c_1 = log(2)/9, rate_c_2 = 0.04,
rate_c_3 = 0.04, rate_e_1 = log(2)/9, rate_e_2 = 0.04,
rate_e_3 = 0.04, delay_1 = 6, delay_2 = 12, max_cal_t = 36,
n_events = NULL)
|
n_c |
Number of patients on control treatment. |
n_e |
Number of patients on experimental treatment. |
rec_period |
Recruitment period. |
rec_power |
Recruitment follows a power model. Pr(recruited before T) = (T / rec_period) ^ rec_power. |
rate_c_1 |
Event rate during first period on control arm. |
rate_c_2 |
Event rate during second period on control arm. |
rate_c_3 |
Event rate during third period on control arm. |
rate_e_1 |
Event rate during first period on experimental arm. |
rate_e_2 |
Event rate during second period on experimental arm. |
rate_e_3 |
Event rate during third period on experimental arm. |
delay_1 |
Time of first change point. |
delay_2 |
Time of second change point. |
max_cal_t |
Maximum calendar time, i.e., time from start of the trial to data cut-off. |
A data frame containing survival time, whether patient has event (1 = yes, 0 = censored), and treatment arm.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.