Brier_inference_bootstrap | R Documentation |
Inference for Brier score for cureit objects
Brier_inference_bootstrap(object, times, ...)
Brier_inference_cv(object, ncv = 10, times, ...)
object |
A cureit object. |
times |
Numeric vector of times to obtain survival probability estimates at |
... |
Additional arguments passed to other methods. |
ncv |
Number of cross-validation folds. |
a tibble
Other cureit() functions:
broom_methods_cureit
,
cureit()
,
nomogram()
,
predict.cureit()
trial <- na.omit(trial)
p <- cureit(surv_formula = Surv(ttdeath, death) ~ age,
cure_formula = ~ age,
data = trial)
times = seq(5,24,0.5)
bootbrier <- Brier_inference_bootstrap(p,times=times, nboot = 10)
plot(times,bootbrier$brier,type="s",xlab="Time",ylab="Brier score")
lines(times,bootbrier$brier_2.5,type="s",lty=2)
lines(times,bootbrier$brier_97.5,type="s",lty=2)
lines(times,bootbrier$brier_cox,type="s",col="red")
lines(times,bootbrier$brier_cox_2.5,type="s",lty=2,col="red")
lines(times,bootbrier$brier_cox_97.5,type="s",lty=2,col="red")
legend("topleft",c("Cure model","Cox model"),col=c("black","red"),lty=1)
p <- cureit(surv_formula = Surv(ttdeath, death) ~ age,
cure_formula = ~ age,
data = trial)
times = seq(5,24,0.5)
cvbrier <- Brier_inference_cv(p,times=times)
plot(times,cvbrier$cv_brier_cure_mean,type="s",xlab="Time",ylab="Brier score")
lines(times,cvbrier$cv_brier_cox_mean,type="s",lty=2,col="red")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.