Description Usage Arguments Value References Examples
View source: R/cr_integratedBrierScore.R
Used to calculate the Integrated Brier Score, which for the competing risks setting is the integral of the squared difference between each observed cumulative incidence function (CIF) for each observation and the corresponding predicted CIF. If the survivor function (1 - CDF) of the censoring distribution is provided, weights can be calculated to account for the censoring.
1 2 | integratedBrierScore(responses, predictions, event, time,
censoringDistribution = NULL, parallel = TRUE)
|
responses |
A list of responses corresponding to the provided
mortalities; use |
predictions |
The predictions to be tested against. |
event |
The event type for the error to be calculated on. |
time |
|
censoringDistribution |
Optional; if provided then weights are calculated on the errors. There are three ways to provide it -
|
parallel |
A logical indicating whether multiple cores should be
utilized when calculating the error. Available as an option because it's
been observed that using Java's |
A numeric vector of the Integrated Brier Score for each prediction.
Section 4.2 of Ishwaran H, Gerds TA, Kogalur UB, Moore RD, Gange SJ, Lau BM (2014). “Random Survival Forests for Competing Risks.” Biostatistics, 15(4), 757–773. doi:10.1093/ biostatistics/kxu010.
1 2 3 4 5 6 7 8 | data <- data.frame(delta=c(1,1,0,0,2,2), T=1:6, x=1:6)
model <- train(CR_Response(delta, T) ~ x, data, ntree=100, numberOfSplits=0, mtry=1, nodeSize=1)
newData <- data.frame(delta=c(1,0,2,1,0,2), T=1:6, x=1:6)
predictions <- predict(model, newData)
scores <- integratedBrierScore(CR_Response(data$delta, data$T), predictions, 1, 6.0)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.