# Piecewise exponential survival with hazard 0.0533 in the first 6
# months, and hazard 0.0309 thereafter, and 5% dropout by the end of
# 1 year.
patrisk(time = c(3, 9), piecewiseSurvivalTime = c(0, 6),
lambda = c(0.0533, 0.0309), gamma = -log(1-0.05)/12)
Run the code above in your browser using DataLab