crps | R Documentation |
Computes the cumulative prediction error curves, aka integrated Brier scores, in ranges of time.
crps(object, models, what, times, start)
object |
An object with estimated prediction error curves obtained with the function pec |
models |
Which models in |
what |
The name of the entry in |
times |
Time points at which the integration of the prediction error curve stops. |
start |
The time point at which the integration of the prediction error curve is started. |
The cumulative prediction error (continuous ranked probability score) is defined as the area under the prediction error curve, hence the alias name, ibs, which is short for integrated Brier score.
A matrix with a column for the crps (ibs) at every requested time point and a row for each model
Thomas A. Gerds tag@biostat.ku.dk
E. Graf et al. (1999), Assessment and comparison of prognostic classification schemes for survival data. Statistics in Medicine, vol 18, pp= 2529–2545.
Gerds TA, Cai T & Schumacher M (2008) The performance of risk prediction models Biometrical Journal, 50(4), 457–479
pec
set.seed(18713)
library(prodlim)
library(survival)
dat=SimSurv(100)
pmodel=coxph(Surv(time,status)~X1+X2,data=dat,x=TRUE,y=TRUE)
perror=pec(list(Cox=pmodel),Hist(time,status)~1,data=dat)
## cumulative prediction error
crps(perror,times=1) # between min time and 1
## same thing:
ibs(perror,times=1) # between min time and 1
crps(perror,times=1,start=0) # between 0 and 1
crps(perror,times=seq(0,1,.2),start=0) # between 0 and seq(0,1,.2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.