# Piecewise exponential survivals, and 5% dropout by the end of
# 1 year.
kmsurv(t = c(2, 8), allocationRatioPlanned = 1,
piecewiseSurvivalTime = c(0, 6),
lambda1 = c(0.0533, 0.0309), lambda2 = c(0.0533, 0.0533),
gamma1 = -log(1-0.05)/12, gamma2 = -log(1-0.05)/12)
Run the code above in your browser using DataLab