Inference for Brier score for cureit objects
Brier_inference_cureit.Rd
Inference for Brier score for cureit objects
Usage
Brier_inference_bootstrap(object, times, ...)
Brier_inference_cv(object, ncv = 10, times, ...)
See also
Other cureit() functions:
broom_methods_cureit
,
cureit()
,
nomogram()
,
predict.cureit()
Examples
trial <- na.omit(trial)
p <- cureit(surv_formula = Surv(ttdeath, death) ~ age,
cure_formula = ~ age,
data = trial)
#> Warning: 0 of 100 did not converge.
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)
#> Warning: 0 of 100 did not converge.
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")