p0 <- 0.2; p1 <- 0.3; param <- c(1, log(2)/12);
theta_eg <-function(t){t^0*0.7}
fit <- cureHR(p0, p1, param[1], param[2],theta_eg, HRType="susceptible")
# with delayed effects
theta_eg2 <- function(t){(t<=9)+(t>9)*0.7}
fit2 <- cureHR(p0, p1, param[1], param[2],theta_eg2, HRType="delayed", tchg=9)
Run the code above in your browser using DataLab