sbrier.score2proba: Function to compute the BSCs from a risk score, for all the...

Description Usage Arguments Value Author(s) References See Also Examples

Description

The function computes all the Brier scores (BSC) and the corresponding integrated Briser score (IBSC) from a risk score, for all the times of event occurrence. The risk score is first transformed in survival probabilities using either a Cox model or the product-limit estimator.

Usage

1
sbrier.score2proba(data.tr, data.ts, method = c("cox", "prodlim"))

Arguments

data.tr

the data frame for the training set. This data frame must contain three columns for the times, the event occurrence and the risk score. These columns are called "time", "event" and "score" respectively.

data.ts

the data frame for the test set. This data frame must contain three columns for the times, the event occurrence and the risk score. These columns are called "time", "event" and "score" respectively.

method

method for survival probabilities estimation using either a Cox model or the product-limit estimator

Value

time

vector of points in time

bsc

vector of Brier scores (BSC) at ome points in time

bsc.integrated

value of the integrated Brier score (IBSC)

Author(s)

Benjamin Haibe-Kains

References

Brier, G. W. (1950) "Verification of forecasts expressed in terms of probabilities", Monthly Weather Review, 78, pages 1–3.

Graf, E. and Schmoor, C. and Sauerbrei, W. and Schumacher, M. (1999) "Assessment and comparison of prognostic classification schemes for survival data ", Statistics in Medicine, 18, pages 2529–2545.

Cox, D. R. (1972) "Regression Models and Life Tables", Journal of the Royal Statistical Society Series B, 34, pages 187–220.

Andersen, P. K. and Borgan, O. and Gill, R. D. and Keiding, N. (1993) "Statistical Models Based on Counting Processes", Springer.

See Also

sbrier, coxph, prodlim

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
set.seed(12345)
age <- rnorm(30, 50, 10)
stime <- rexp(30)
cens <- runif(30,.5,2)
sevent <- as.numeric(stime <= cens)
stime <- pmin(stime, cens)
dd <- data.frame("time"=stime, "event"=sevent, "score"=age)

#Cox's model
sbrier.score2proba(data.tr=dd, data.ts=dd, method="cox")
#product-limit estimator
sbrier.score2proba(data.tr=dd, data.ts=dd, method="prodlim")

Example output

Loading required package: survival
Loading required package: prodlim
$time
 [1] 0.004689285 0.005994277 0.027691307 0.103596354 0.151763077 0.201856563
 [7] 0.234507331 0.237895078 0.274908865 0.350409275 0.353707455 0.361385586
[13] 0.429559761 0.440233010 0.499892540 0.583135597 0.607145252 0.634567793
[19] 0.727884448 0.871008793 0.913274200 0.981188104 1.036367334 1.184892160
[25] 1.284450641 1.339185100 1.381921960 1.507877211 1.692458095 1.700347331

$bsc
 [1] 0.03232491 0.06206269 0.08934965 0.11492774 0.13822885 0.15911949
 [7] 0.17755074 0.19434568 0.20888660 0.22058101 0.23139855 0.23862344
[13] 0.24340178 0.24743361 0.25030252 0.24863864 0.24579385 0.23832245
[19] 0.23832245 0.23028374 0.21998490 0.20300316 0.20300316 0.18643469
[25] 0.16162447 0.16162447 0.16162447 0.16162447 0.16162447 0.16162447

$bsc.integrated
[1] 0.1921649

$time
 [1] 0.004689285 0.005994277 0.027691307 0.103596354 0.151763077 0.201856563
 [7] 0.234507331 0.237895078 0.274908865 0.350409275 0.353707455 0.361385586
[13] 0.429559761 0.440233010 0.499892540 0.583135597 0.607145252 0.634567793
[19] 0.727884448 0.871008793 0.913274200 0.981188104 1.036367334 1.184892160
[25] 1.284450641 1.339185100 1.381921960 1.507877211 1.692458095 1.700347331

$bsc
 [1] 0.03067931 0.05861806 0.07869192 0.10693783 0.13631629 0.16160198
 [7] 0.17135662 0.18572678 0.19562393 0.20790674 0.22617601 0.23606165
[13] 0.24557882 0.25216055 0.25353231 0.25649214 0.25387114 0.25058308
[19] 0.25058308 0.24299165 0.23688097 0.22158657 0.22158657 0.19687304
[25] 0.17033738 0.17033738 0.17033738 0.17033738 0.17033738 0.17033738

$bsc.integrated
[1] 0.1986622

survcomp documentation built on Nov. 8, 2020, 4:54 p.m.