model_performance: Model performance for survival models

Description Usage Arguments Details References Examples

View source: R/model_performance.R

Description

Function model_performance calculates the prediction error for chosen survival model.

Usage

1
model_performance(explainer, type = "BS")

Arguments

explainer

a model to be explained, preprocessed by the 'survxai::explain' function

type

character - type of the response to be calculated Currently following options are implemented: 'BS' for Expected Brier Score

Details

For type = "BS" prediction error is the time dependent estimates of the population average Brier score. At a given time point t, the Brier score for a single observation is the squared difference between observed survival status and a model based prediction of surviving time t.

References

Ulla B. Mogensen, Hemant Ishwaran, Thomas A. Gerds (2012). Evaluating Random Forests for Survival Analysis Using Prediction Error Curves. Journal of Statistical Software, 50(11), 1-23. URL http://www.jstatsoft.org/v50/i11/.

Examples

1
2
3
4
5
6
7
8
9
   library(survxai)
   library(rms)
   data("pbcTrain")
   data("pbcTest")
   cph_model <- cph(Surv(years, status)~ sex + bili + stage,
     data=pbcTrain, surv=TRUE, x = TRUE, y=TRUE)
   surve_cph <- explain(model = cph_model, data = pbcTest[,-c(1,5)],
                        y = Surv(pbcTest$years, pbcTest$status))
   mp_cph <- model_performance(surve_cph)

survxai documentation built on Aug. 28, 2020, 5:07 p.m.