predict.cureit | R Documentation |
Predicted survival probability by cure model
## S3 method for class 'cureit'
predict(
object,
times = NULL,
probs = NULL,
newdata = NULL,
method = "prob",
brier = FALSE,
cox = FALSE,
...
)
object |
A cureit object. |
times |
Numeric vector of times to obtain survival probability estimates at |
probs |
Numeric vector of quantiles to obtain estimates at |
newdata |
A |
method |
Output format of predicted values: "lp" (linear predictor) or "prob" (predicted probabilities). |
brier |
Boolean indicator of calculating the Brier scores at specified |
cox |
Boolean indicator of fitting the Cox model for the training data and calculating the Brier scores at specified |
... |
passed to methods |
named list of prediction estimates
Other cureit() functions:
Brier_inference_bootstrap()
,
broom_methods_cureit
,
cureit()
,
nomogram()
p <- cureit(surv_formula = Surv(ttdeath, death) ~ age,
cure_formula = ~ age,
data = trial)
pred <- predict(p, times = seq(5,24,0.5),
newdata = trial[complete.cases(trial), ], brier=TRUE,cox=TRUE)
plot(seq(5,24,0.5),pred$brier,type="S",pch=1)
lines(seq(5,24,0.5),pred$brier_cox,type="S",col="red",pch=3)
legend("topright",c("Cure model","Cox model"),
col=c("black","red"),lty=1,pch=c(1,3))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.