sbrier_IC {ICcforest} | R Documentation |
Model Fit For Interval-Censored Data
Description
Compute the (integrated) Brier score to evaluate the model fit for interval-censored survival data.
Usage
sbrier_IC(
obj,
pred,
btime = range(as.numeric(obj[, 1:2])),
type = c("IBS", "BS")
)
Arguments
obj |
an object of class |
pred |
predicted values. This can be a matrix of survival probabilities evaluated
at a sequence of time points for a set of new data, a list of |
btime |
a vector of length two indicating the range of times that the scores are computed on.
The default |
type |
a character string denoting the type of scores returned. For |
Value
If type = "IBS"
, this returns the integrated Brier score.
If type = "BS"
, this returns the Brier scores.
References
S. Tsouprou. Measures of discrimination and predictive accuracy for interval-censored data. Master thesis, Leiden University. https://www.math.leidenuniv.nl/scripties/MasterTsouprou.pdf.
Examples
### Example with dataset miceData
library(survival)
library(icenReg)
data(miceData)
## For proper evaluation, Inf should be set to be a large number, for example, 9999999.
idx_inf <- (miceData$u == Inf)
miceData$u[idx_inf] <- 9999999.
obj <- Surv(miceData$l, miceData$u, type = "interval2")
## Model fit for an NPMLE survival curve with survfit
pred <- survival::survfit(formula = Surv(l, u, type = "interval2") ~ 1, data = miceData)
# Integrated Brier score up to time = 642
sbrier_IC(obj, pred, btime = c(0, 642), type = "IBS")
## Model fit for a semi-parametric model with icenReg::ic_sp()
pred <- icenReg::ic_sp(formula = Surv(l, u, type = "interval2") ~ 1, data = miceData)
# Integrated Brier score up to the largest endpoints of all censoring intervals in the dataset
sbrier_IC(obj, pred, type = "IBS")
## Model fit for an NPMLE survival curve with icenReg::ic_np()
pred <- icenReg::ic_np(miceData[,c('l', 'u')])
# Brier score computed at every left and right endpoints of all censoring intervals in the dataset
sbrier_IC(obj, pred, type = "BS")