get_cox_pec: Calculate prediction error curves and integrated Brier score...

View source: R/functions.R

get_cox_pecR Documentation

Calculate prediction error curves and integrated Brier score (IBS).

Description

Computes prediction error curves and integrated Brier score (IBS) for a Cox model using pec and crps.

Usage

get_cox_pec(
  cox_model,
  data = NULL,
  type = c("ibs", "pec", "brier"),
  splitMethod = "none",
  ...
)

Arguments

cox_model

a Cox model of the coxph or coxex class.

data

the data frame used for the model construction. Ignored, if coxex object provided.

type

type of object to be returned: 'ibs' returns the Integrated Brier Score (IBS), 'pec' returns a pec object and 'brier' returns a data frame with Brier scores for unique time points of the brier class.

splitMethod

validation method used for calculation of the Bier scores as specified by the respective pec argument. One of 'none' (no validation), 'cvK' (K-fold cross-validation, e.g. 'cv10'), 'boot' (bootstrap), 'BootCv' (bootstrap cross-validation), 'Boot632', 'Boot632plus', 'loocv' or 'NoInf', see the upstream function for details.

...

extra arguments passed to pec.

Value

a numeric vector with IBS values, a pec class or a brier class object.

References

  • Graf, E., Schmoor, C., Sauerbrei, W. & Schumacher, M. Assessment and comparison of prognostic classification schemes for survival data. Stat. Med. 18, 2529–2545 (1999).


PiotrTymoszuk/coxExtensions documentation built on Feb. 6, 2024, 10:58 p.m.