Skip to contents

Computes concordance index (c-index) and Brier scores at the specified landmark times and prediction horizons.

Usage

# S4 method for class 'LandmarkAnalysis'
performance_metrics(
  x,
  landmarks,
  horizons,
  c_index = TRUE,
  brier = TRUE,
  auc_t = FALSE,
  train = TRUE,
  h_times = c(),
  cause = 1
)

Arguments

x

An object of class LandmarkAnalysis.

landmarks

A numeric vector of landmark times.

horizons

Vector of prediction horizons up to when the survival submodel is fitted.

c_index

A logical. If TRUE (default), C index is reported.

brier

A logical. If TRUE (default), Brier score is reported.

auc_t

A logical. If TRUE, AUC_t is reported.

train

A logical. If TRUE (default), performance metrics are computed in the training set. If FALSE, they are computed in the test set.

h_times

A numeric vector of prediction horizon times, specified relative to each landmark time, at which auc_t and Brier scores are calculated.

cause

Numeric code (in @event_indicator) of the event of interest used when computing competing-risks metrics with Score. Defaults to 1.

Value

Data frame with performance metrics across the specified landmark times and prediction horizons.