brier {survdnn} | R Documentation |
Brier Score for Right-Censored Survival Data at a Fixed Time
Description
Computes the Brier score at a fixed time point using inverse probability of censoring weights (IPCW).
Usage
brier(object, pre_sp, t_star)
Arguments
object |
A 'Surv' object with observed time and status. |
pre_sp |
A numeric vector of predicted survival probabilities at 't_star'. |
t_star |
The evaluation time point. |
Value
A single numeric value representing the Brier score.
Examples
library(survival)
data(veteran, package = "survival")
mod <- survdnn(Surv(time, status) ~
age + karno + celltype, data = veteran, epochs = 50, verbose = FALSE)
pred <- predict(mod, newdata = veteran, type = "survival", times = c(30, 90, 180))
y <- model.response(model.frame(mod$formula, veteran))
survdnn::brier(y, pre_sp = pred[["t=90"]], t_star = 90)
[Package survdnn version 0.6.0 Index]