score.iAUC: Scoring function for evaluating survival prediction by...

Description Usage Arguments Value Examples

View source: R/int.R

Description

Time-wise integrated prediction for survival is performed by this scoring function using the timeROC-package. It's offered as an alternative to the score.cindex-function with the difference that time-wise integrated AUC is sensitive to the choice of time-window. By default (as similar to DREAM 9.5 mCRPC challenge), the AUCs are determined at 6 to 30 months, and the AUC is then normalized to a score within [0,1]. Notice that for studies shorter or longer than this proposed time window, the scoring function should be adjusted accordingly.

Usage

1
score.iAUC(pred, time, event, real, times = seq(6, 30, by = 1) * 30.5)

Arguments

pred

Numeric risk score for each event

time

A vector of event or censoring times

event

A binary valued vector that indicates either death (1) or right-censoring (0)

real

A previously constructed Surv-object instead of providing time and event

times

Time-points at which to evaluate the iAUC

Value

The integrated area under the ROC-curve over time

Examples

1
2
3
4
5
6
7
# A random prediction ought to be near 0.5 
# iAUC is sensitive to the choice of time points to test AUC at
set.seed(1); prediction <- sample(1:20)
time <- seq(from=1000, to=50, by=-50)
event <- c(0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 1, 1, 1, 0, 1, 1)
library(survival)
score.iAUC(pred = prediction, real = Surv(time=time, event=event))

Example output

Attaching package:ePCRThe following object is masked frompackage:graphics:

    plot

The following object is masked frompackage:base:

    plot

[1] 0.6678623

ePCR documentation built on Dec. 1, 2019, 1:21 a.m.

Related to score.iAUC in ePCR...