Integrated Brier Score

eval_bscore(surv_probs, label = NULL, time = NULL, status = NULL,
  cens_data = NULL, cens_model = "cox", eval_times = NULL,
  scale = TRUE)

Arguments

surv_probs

a matrix of survival probabilities

label

a numeric vector of class sgb_label

time

(needed iff label is unspecified) a numeric vector of time values. All time values must be greater than 0.

status

(needed iff label is unspecified) a numeric vector of status values. All status values should be 0 or 1, with 1 indicating that the event of interest occurred and 0 indicating censoring.

cens_data

(optional) a data.frame or tibble containing a selection of variables that will be used to model censoring probability. The inverse probability of censoring will then be used to weight each observation's contribution go the integrated Brier score.

cens_model

Method for estimating inverse probability of censoring weights:

  • cox: A semi-parametric Cox proportional hazard model is fitted to the censoring times

  • nonpar: Nonparametric extension of the Kaplan-Meier for the censoring times using symmetric nearest neighborhoods – available for arbitrary many strata variables on the right hand side of argument formula but at most one continuous variable (see prodlim and neighborhood)

  • aalen: The nonparametric Aalen additive model fitted to the censoring times. Requires the timereg package.

Note: if cens_data is unspecified, the Kaplan-Meier estimator will be used to estimate inverse probability of censoring weights

eval_times

A numeric vector giving times at which to compute Brier scores, which will then be used collectively to compute the integrated Brier score.

scale

(TRUE/FALSE) if TRUE, a marginal Kaplan-Meier prediction model will be fitted to the given (time, status) values and used as a reference Brier score. Then, a scaled Brier score will be computed as 1 - (model-IBS / reference-IBS)

Value

a numeric value. If scale = TRUE, return values of 0 indicate a non-informative model and values of 1 indicate a perfect model. If scale = FALSE, return values of 0 indicate a perfect model, and return values greater than 0 are difficult to interpret.

Examples

# prodlim needs to be loaded for pec functions to work. library(prodlim) library(survival) set.seed(329) # predict 1/2 for everyone, all the time surv_probs <- matrix( data = rep(1/2, 1000), nrow = 100, ncol = 10 ) # make random time & status values time = runif(100, min = 1, max = 10) status = c(rep(1, 50), rep(0, 50)) # use all the possible times eval_times = seq(1, 10, length.out = 10) # censor data has one variable that is # related to time values cens_data = data.frame(x1 = time + rnorm(100, sd = 1/2)) # note that the Brier score is 1/4, as expected, when # no adjustment is applied for censoring. eval_bscore( surv_probs = surv_probs, label = sgb_label(time, status), eval_times = eval_times, cens_data = cens_data, cens_model = 'marginal', scale = FALSE )
#> [1] 0.25
# Now adjust for censoring: eval_bscore( surv_probs = surv_probs, label = sgb_label(time, status), eval_times = eval_times, cens_data = cens_data, cens_model = 'cox', scale = FALSE )
#> [1] 0.242347