data(veteran, package = "survival")
fit <- bpph(Surv(time, status) ~ karno, data = veteran, approach = "mle", init = 0)
pr <- predict(fit, times = seq(0, 400, by = 2))
predict(fit, veteran[1:2, ], type = "survival", eval_time = c(100, 200))
predict(fit, veteran[1:2, ], type = "time")
if (FALSE) {
ggplot2::ggplot(pr, ggplot2::aes(time, surv)) + ggplot2::geom_line()
}
Run the code above in your browser using DataLab