three_piece_sim: Simulate survival data from a two-arm trial

Description Usage Arguments Value

View source: R/three_piece_sim.R

Description

three_piece_sim Simulate survival data: three-piece exponential vs. three-piece exponential.

Usage

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)

Arguments

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.

Value

A data frame containing survival time, whether patient has event (1 = yes, 0 = censored), and treatment arm.


dominicmagirr/modestWLRT documentation built on Sept. 16, 2020, 2:43 p.m.