ROC: Receiver Operator Characteristics (ROC) for a 'joint' model.

View source: R/ROC.R

ROCR Documentation

Receiver Operator Characteristics (ROC) for a joint model.

Description

Using longitudinal information available up to a time, establish diagnostic capabilities (ROC, AUC and Brier score) of a fitted joint model.

Usage

ROC(fit, data, Tstart, delta, control = list(), progress = TRUE, boot = FALSE)

Arguments

fit

a joint model fit by the joint function.

data

the data to which the original joint model was fit.

Tstart

The start of the time window of interest, Tstart denotes the time point up to which longitudinal process(es) is used in calculation of survival probabilities.

delta

scalar denoting the length of time interval to check for failure times.

control

list of control arguments to be passed to dynPred, which acts as the main workhorse function for ROC. Takes default arguments of dynPred if not supplied.

progress

should a progress bar be shown, showing the current progress of the ROC function ( to progress = TRUE.

boot

logical. Not currently used, legacy argument.

Value

A list of class ROC.joint consisting of:

Tstart

numeric denoting the start of the time window of interest; all dynamic predictions generated used longitudinal information up-to time T_{\mathrm{start}}.

delta

scalar which denotes length of interval to check, such that the window is defined by [T_{\mathrm{start}}, T_{\mathrm{start}}, + \delta].

candidate.u

candidate vector of failure times to calculate dynamic probability of surviving for each subject alive in data at time T_{\mathrm{start}}.

window.failures

numeric denoting the number of observed failures in [T_{\mathrm{start}}, T_{\mathrm{start}}, + \delta].

Tstart.alive

numeric denoting the risk set at Tstart.

metrics

a data.frame containing probabilistic thresholds with: TP true positives; FN false negatives; FP false positives; TN true negatives; TPR true positive rate (sensitivity); FPR false positive rate (1-specificity); Acc accuracy; PPV positive predictive value (precision); NPV negative predictive value; F1s F1 score and J Youden's J statistic.

AUC

the area under the curve.

BrierScore

The Brier score.

PE

The predicted error (taking into account censoring), loss function: square.

MH.acceptance

Raw acceptance percentages for each subject sampled.

MH.acceptance.bar

mean acceptance of M-H scheme across all subjects.

simulation.info

list containing information about call to dynPred.

Author(s)

James Murray (j.murray7@ncl.ac.uk).

See Also

dynPred, and plot.ROC.joint.

Examples


data(PBC)
PBC$serBilir <- log(PBC$serBilir)
long.formulas <- list(serBilir ~ drug * time + (1 + time|id))
surv.formula <- Surv(survtime, status) ~ drug
family <- list('gaussian')
fit <- joint(long.formulas, surv.formula, PBC, family)
(roc <- ROC(fit, PBC, Tstart = 8, delta = 2, control = list(nsim = 25)))
plot(roc)


gmvjoint documentation built on Oct. 6, 2024, 1:07 a.m.