Time-Dependent ROC

Survival Analysis
time-dependent-roc
auc
timeROC
ROC curves and AUC evaluated at specific follow-up times for survival predictions
Published

April 17, 2026

Introduction

Time-dependent ROC extends ROC analysis to survival data: at each evaluation time, define events (death before \(t\)) vs non-events (alive at \(t\)), compute AUC from a continuous predictor (e.g., linear predictor from a Cox model).

Prerequisites

ROC curves, survival analysis.

Theory

Incident/dynamic: events are those with \(T = t\); controls are \(T > t\).

Cumulative/dynamic: events are those with \(T \leq t\); controls are \(T > t\).

IPCW-based estimator accounts for censoring.

Assumptions

Non-informative censoring; correct IPCW weights.

R Implementation

library(timeROC); library(survival)

data(lung)
fit <- coxph(Surv(time, status) ~ age + sex + ph.ecog, data = lung)
lp <- predict(fit, type = "lp")

tROC <- timeROC(T = lung$time, delta = lung$status, marker = lp,
                times = c(180, 365, 730), cause = 1,
                weighting = "marginal")
tROC
plot(tROC, time = 365, col = "steelblue")

Output & Results

Time-specific AUC with CI; ROC curve at each requested time.

Interpretation

“Time-dependent AUC was 0.72 at 1 year and 0.69 at 2 years, indicating stable discrimination over follow-up.”

Practical Tips

  • Report AUC at clinically meaningful horizons.
  • Cumulative-dynamic is more common; incident-dynamic useful for incidence-focused questions.
  • timeROC supports competing risks.
  • Calibration at the same times is equally important – AUC alone does not cover calibration.
  • For external validation, apply model from development cohort to validation cohort and compute tROC.