Skip to contents

Time-Dependent ROC Analysis

Usage

timeroc(
  data,
  elapsedtime,
  outcome,
  outcomeLevel,
  marker,
  timepoints = "12, 36, 60",
  method = "incident",
  bootstrapCI = FALSE,
  nboot = 100,
  plotROC = TRUE,
  plotAUC = TRUE,
  timetypeoutput = "months",
  showOptimalCutoff = TRUE,
  showMarkerStats = TRUE,
  compareBaseline = FALSE,
  smoothAUC = FALSE
)

Arguments

data

.

elapsedtime

.

outcome

.

outcomeLevel

.

marker

.

timepoints

.

method

.

bootstrapCI

.

nboot

.

plotROC

.

plotAUC

.

timetypeoutput

Time units for display in plots and results.

showOptimalCutoff

Calculate and display optimal cutoff points that maximize Youden index.

showMarkerStats

Display descriptive statistics for the marker variable.

compareBaseline

Compare marker performance to a baseline model (AUC = 0.5).

smoothAUC

Apply smoothing to the AUC over time plot for better visualization.

Value

A results object containing:

results$texta html
results$aucTablea table
results$rocPlotan image
results$aucPlotan image
results$markerStatsa table
results$cutoffTablea table
results$modelComparisona html
results$clinicalInterpretationa html

Tables can be converted to data frames with asDF or as.data.frame. For example:

results$aucTable$asDF

as.data.frame(results$aucTable)