Prediction on a Semicure Object
predict.semicure
Description
Prediction from a fitted semiparametric cure model object.
Usage
predict(object, newdata, newtime = NULL, cumhaz = F, overall = F)
Arguments
object: a fitted semicure object.
newdata: a data frame containing the values of covariates at which the prediction is required.
newtime: times at which the survival probabilities are predicted. The default for each row of newdata is the time in the row.
cumhaz: if TRUE, cumulative hazards instead of survival probabilities are predicted.
overall: if TRUE, unconditional survival probabilities instead of survival probabilities of uncured patients are predicted.
Value
An object of class predict.semicure is returned. It is a list with a component named prediction, which contains the prediction. This component itself is a list with each component for one row of newdata. Each component contains time (at which the prediction is made), surv (predicted survival probabilities or cumulative hazard rates), median (the median survival time if the corresponding patient in this row is uncured), and curerate (the estimated cure rate).
This function is a method for the generic function predict() for class "semicure". It can be invoked by calling predict(x) for an object x of the appropriate class.
It can be printed with print.
See Also
semicure, predict, SEMICURE main page.
Examples
> z <- semicure(Surv(time, cens) ~ transplant, ~ transplant, data = goldman.data) > predict(z, newdata = goldman.data[c(1, 50), ], newtime = 50:54) Call: predict.semicure(object = z, newdata = goldman.data[c(1, 50), ], newtime = 50: 54) Predicted uncured survival probabilities and cure rates 1 2 cure rate 0.263 cure rate 0.197 median 171 median 98 time surv time surv 50 0.911 50 0.839 51 0.901 51 0.821 52 0.891 52 0.804 53 0.891 53 0.804 54 0.880 54 0.787