R/tte-sim.R
sim_pw_const_haz.Rd
Simulate Event Times for Each Individual from a Piecewise Constant Hazard Model
sim_pw_const_haz(n, hazard_periods = NULL, hazard_values)
Vector of simulated times from the time-to-event distribution
Simulate the event or censoring times for each participant using a
piecewise constant hazard model where each time period is defined to have
a different constant hazard. Here, hazard_periods
defines the right
time points for each time period (with the exception of the last time
period which extends to infinity), and hazard_values
defines the constant
hazards for each time period.