Skip to contents

predict(object, ...) on a sest_fit calls stats::predict() on the backend fit inside it (e.g. predict.coxph(), predict.flexsurvreg()) and passes ... to it unchanged. A Kaplan-Meier fit has no such method and is refused. For a backend-independent survival, hazard or quantile prediction on a common time grid, use sest_curve() instead.

Value

Whatever the backend's predict method returns.

See also

sest_curve() for a backend-independent prediction grid.

Examples

fit <- survestimand(survival::Surv(time, status) ~ age + sex, survival::lung,
               method = "cox")
head(predict(fit, type = "lp"))
#> [1] 0.39950470 0.29723270 0.09268872 0.10973405 0.16087005 0.39950470