Tutorials › Multi-Omics Data Integration › Time-Dependent ROC Curves For Survival Predictions

Clinical Outcomes: Survival and Longitudinal Data · Tutorial 451 of 597

Time-Dependent ROC Curves For Survival Predictions

Learn how cumulative and incident ROC curves evaluate survival predictions at chosen horizons, including the censoring assumptions and weights needed for valid estimates.

Advanced 12 min read

What You'll Learn

  • Define cumulative/dynamic and incident/dynamic cases and controls at a prediction horizon.
  • Interpret time-specific sensitivity and specificity for a high-risk score.
  • Construct inverse-probability-of-censoring weights with correct event-time and horizon boundary conventions.
  • Derive why the weighted case and control contributions recover their target distributions.
  • Calculate censoring-adjusted cumulative and incident ROC quantities.
  • Diagnose positivity, censoring-model, and validation-data problems.

Why Evaluate Discrimination at a Time Horizon?

A survival prediction is about both an event and its timing. A score can rank people well overall yet be less useful for distinguishing who will experience an event by a clinically meaningful horizon, such as one year. A time-dependent receiver operating characteristic (ROC) curve makes that horizon explicit: it compares a chosen risk score among people defined as cases and controls for that time.

Let \(T\) be the event time, \(C\) the censoring time, \(U=\min(T,C)\) the observed follow-up time, and \(\Delta=I(T\leq C)\) the event indicator. Let \(R\) be a prediction score, with larger values interpreted as higher event risk. The score may come from a multi-omics survival model. For a threshold \(c\), a person is classified as high risk when \(R>c\). The ROC curve varies \(c\) and plots sensitivity against one minus specificity.

Definition: At horizon \(t\), a cumulative/dynamic ROC defines cases by \(T\leq t\) and controls by \(T>t\). Its sensitivity is \(P(R>c\mid T\leq t)\), and its specificity is \(P(R\leq c\mid T>t)\). An incident/dynamic ROC defines cases by an event occurring at time \(t\) (formally, the event-time distribution locally at \(t\)) and controls by \(T>t\). Its sensitivity is \(P(R>c\mid T=t)\), interpreted through the event-time density when \(T\) is continuous; its specificity is \(P(R\leq c\mid T>t)\).

The cumulative definition asks whether the score distinguishes people who have experienced the event by \(t\) from those who remain event-free beyond \(t\). The incident definition asks how well it distinguishes people experiencing the event around \(t\) from those still event-free at \(t\). Both are time-specific; their case groups are different, so their sensitivities and curves need not agree.

Definitions and Censoring Assumptions

For either definition, the population sensitivity and specificity at threshold \(c\) are conditional probabilities in the stated case and control groups. A curve is obtained by evaluating these probabilities across thresholds. We use \(R>c\) for a positive classification and \(R\leq c\) for a negative one; this convention assigns tied scores to the negative group.

With right censoring, an event by \(t\) is known only for people whose event is observed by \(t\), and a control at \(t\) is known only for someone observed past \(t\). Simply calculating proportions from those observed groups can be biased if censoring changes the score distribution. Inverse-probability-of-censoring weighting (IPCW) compensates for the chance that a person with particular characteristics remains observable.

Assumptions for the IPCW formulas: (1) Censoring is conditionally independent of the pair \((T,R)\) given the variables \(Z\) used to model censoring: \(C\perp (T,R)\mid Z\). Thus the condition must account for score-related censoring; \(Z\) may include \(R\) and other predictors relevant to censoring. (2) The required observation probabilities are positive for the people and times being evaluated. (3) The censoring distribution used in the weights is correctly specified or consistently estimated. We define \(G_-(s\mid Z)=P(C\geq s\mid Z)\) for observing an event at \(s\), and \(G_+(t\mid Z)=P(C>t\mid Z)\) for being observed past \(t\). These distinct boundary probabilities respect the convention \(\Delta=I(T\leq C)\), including possible censoring mass at the horizon.

The conditional independence condition is important: independence of \(C\) and \(T\) given \(Z\) alone is not enough if censoring still depends on \(R\) after conditioning on \(Z\). The ROC calculation selects people by their scores, so that remaining dependence can distort the selected case and control score distributions. If censoring is independent of both event time and score without conditioning, an unconditional censoring model may be appropriate; otherwise the relevant variables must be included in \(Z\).

Under these assumptions, define \(w_i^{\mathrm{case}}=1/G_-(U_i\mid Z_i)\) for observed events and \(w_i^{\mathrm{control}}=1/G_+(t\mid Z_i)\) for people observed beyond \(t\). The cumulative IPCW estimates are

$$ \widehat{\mathrm{Se}}_t(c)= \frac{\sum_i \dfrac{\Delta_i I(U_i\leq t)}{\widehat G_-(U_i\mid Z_i)}I(R_i>c)} {\sum_i \dfrac{\Delta_i I(U_i\leq t)}{\widehat G_-(U_i\mid Z_i)}}, \qquad \widehat{\mathrm{Sp}}_t(c)= \frac{\sum_i \dfrac{I(U_i>t)}{\widehat G_+(t\mid Z_i)}I(R_i\leq c)} {\sum_i \dfrac{I(U_i>t)}{\widehat G_+(t\mid Z_i)}}. $$

Here \(\widehat G_-\) and \(\widehat G_+\) estimate the corresponding conditional censoring probabilities. A control contributes only if \(U_i>t\), which entails both \(T_i>t\) and \(C_i>t\). Therefore its weight uses \(G_+(t\mid Z_i)\), not \(P(C\geq t\mid Z_i)\). If censoring has no atom at \(t\), the two probabilities coincide, but the strict-boundary formula remains valid without that additional assumption.

Why the Weights Work

The essential justification is that weighting by the inverse chance of observation cancels the selection caused by censoring. For an event at time \(s\), the event is observed when \(C\geq s\). Conditional independence gives

$$ E\left[ \left.\frac{I(C\geq T)}{G_-(T\mid Z)} \right|T,R,Z\right] = \frac{P(C\geq T\mid T,R,Z)}{G_-(T\mid Z)} = 1. $$

Consequently, for any score-defined event subset, including \(T\leq t\) and \(R>c\), its expected weighted observed-event contribution equals its population contribution. For controls, \(U>t\) requires \(T>t\) and \(C>t\); likewise,

$$ E\left[ \left.\frac{I(T>t)I(C>t)}{G_+(t\mid Z)} \right|T,R,Z\right] = I(T>t)\frac{P(C>t\mid T,R,Z)}{G_+(t\mid Z)} = I(T>t). $$

Applying these identities to both the numerator and denominator of each conditional proportion yields the target sensitivity or specificity. The argument also shows why censoring weights that omit a variable related to both censoring and score can fail: the conditional observation probability in the numerator may then differ from the one used in the weight.

Worked Example: A Cumulative ROC With Complete Follow-Up

Consider six hypothetical patients with event status fully known. At horizon \(t=12\) months, their scores and event times are: scores \(0.9,0.7,0.8,0.4,0.6,0.2\), with event times \(7,11,17,20,15,8\) months, respectively. Use threshold \(c=0.65\).

The cumulative cases are patients 1, 2, and 6, because their event times are at most 12 months. Patients 3, 4, and 5 are controls because their event times exceed 12 months. There is no censoring, so all weights equal 1.

Among the three cases, scores above \(0.65\) are \(0.9\) and \(0.7\). Thus sensitivity is \(2/3=0.6667\). Among the three controls, scores at or below \(0.65\) are \(0.4\) and \(0.6\), so specificity is also \(2/3=0.6667\). At this threshold the false-positive rate is \(1-0.6667=0.3333\). These values describe discrimination at 12 months and this particular threshold, not overall calibration or causal effects.

Incident Curves and Local Estimation

For continuous event times, the probability \(P(T=t)\) is zero, so incident sensitivity is understood as a conditional distribution at the event time, estimated from events in a neighborhood of \(t\). A common estimator uses a nonnegative kernel \(K\) and bandwidth \(h\), where \(K_h(u-t)=K((u-t)/h)\). The bandwidth determines how local the event-time neighborhood is. An IPCW estimate of incident sensitivity is

$$ \widehat{\mathrm{Se}}^{\,I}_t(c)= \frac{\sum_i \dfrac{\Delta_i K_h(U_i-t)}{\widehat G_-(U_i\mid Z_i)}I(R_i>c)} {\sum_i \dfrac{\Delta_i K_h(U_i-t)}{\widehat G_-(U_i\mid Z_i)}}. $$

The kernel weights observed events near \(t\); the event-time censoring weights correct their unequal observation probabilities. The incident specificity uses the same dynamic controls as the cumulative definition:

$$ \widehat{\mathrm{Sp}}^{\,I}_t(c)= \frac{\sum_i \dfrac{I(U_i>t)}{\widehat G_+(t\mid Z_i)}I(R_i\leq c)} {\sum_i \dfrac{I(U_i>t)}{\widehat G_+(t\mid Z_i)}}. $$

Thus the controls are event-free beyond \(t\), while incident cases are events locally around \(t\). Estimates can be sensitive to bandwidth: a narrow window may contain too few events and be unstable; a wide window can average over genuine changes in discrimination over time.

Worked Example: Censoring-Adjusted Cumulative Estimates

Suppose a hypothetical validation sample has horizon \(t=12\) months. Three observed cases have scores \(0.9,0.7,0.3\), event times \(6,10,9\) months, and estimated event-observation probabilities \(G_-\) of \(0.8,0.5,0.75\), respectively. Two observed controls have scores \(0.4,0.5\) and estimated probabilities of remaining uncensored beyond 12 months \(G_+(12\mid Z)\) of \(0.6,0.5\). A sixth patient was censored at month 8 and cannot be classified as a case or control at 12 months. Take \(c=0.6\).

The case weights are \(1/0.8=1.25\), \(1/0.5=2\), and \(1/0.75=1.333\). Their total is \(4.583\). The first two scores exceed \(0.6\), so the weighted sensitivity is

$$ \widehat{\mathrm{Se}}_{12}(0.6)= \frac{1.25+2}{1.25+2+1.333} =\frac{3.25}{4.583} =0.7091. $$

Both controls have scores at or below \(0.6\). Their weights are \(1/0.6=1.667\) and \(1/0.5=2\), so specificity is \((1.667+2)/(1.667+2)=1.000\). This is a weighted estimate: its sensitivity is not the unweighted fraction of observed cases above threshold. The example assumes the stated conditional censoring probabilities are appropriate for the score and other relevant predictors, and that they are positive.

Worked Example: An Incident Sensitivity Near a Horizon

For a separate hypothetical data set, estimate incident sensitivity near \(t=10\) months using three nearby observed events. Suppose their scores are \(0.8,0.4,0.7\); their kernel weights \(K_h(U_i-t)\) are \(0.5,1,0.5\); and their estimated \(G_-\) values are \(0.8,0.5,0.7\). At \(c=0.6\), the combined kernel-and-censoring weights are \(0.5/0.8=0.625\), \(1/0.5=2\), and \(0.5/0.7=0.7143\).

The first and third scores exceed \(0.6\), so the weighted numerator is \(0.625+0.7143=1.3393\). The denominator is \(0.625+2+0.7143=3.3393\). Therefore

$$ \widehat{\mathrm{Se}}^{\,I}_{10}(0.6) = \frac{1.3393}{3.3393} =0.4011. $$

Suppose the observed controls beyond month 10 have scores \(0.3,0.5,0.9\) and \(G_+(10\mid Z)\) values \(0.6,0.5,0.75\). Their weights are \(1.667,2,1.333\). The first two are classified negative, giving incident specificity \((1.667+2)/(1.667+2+1.333)=0.7333\). These calculations illustrate separate incident cases and dynamic controls; the estimate depends on the chosen bandwidth and on valid censoring weights.

Diagnostics, Alternatives, and Limitations

Before interpreting an estimated curve, inspect the effective information behind it. Few events near a time point make incident estimates unstable, while few controls remaining beyond a late horizon make either type of specificity imprecise. Very small estimated censoring probabilities produce large weights, allowing a small number of observations to dominate. Report the horizon, threshold convention, censoring model, and—for incident curves—the kernel and bandwidth. Uncertainty should reflect estimation of the ROC quantities and censoring distribution, commonly through a bootstrap that repeats the relevant fitting steps.

Check whether the censoring model includes the score, or variables that jointly predict censoring and the score, as required by the conditional independence assumption. Compare predicted censoring probabilities with observed censoring patterns across relevant predictor groups, and examine the largest weights and their influence on the curve. Such diagnostics cannot prove conditional independence, but they can reveal poor support or a visibly inadequate model. If a meaningful group has near-zero probability of remaining observed, positivity fails; reweighting cannot recover its missing outcome distribution reliably.

Cumulative ROC curves provide a direct answer about classifying event occurrence by a specified horizon. Incident curves focus on discrimination among events occurring around a particular time, which can be useful when performance changes over follow-up. Neither replaces a single summary of pairwise ranking such as the concordance index: the concordance index aggregates comparable event-time pairs and does not directly state sensitivity and specificity at a chosen horizon and threshold. ROC analysis also does not assess whether predicted absolute risks agree with observed risks; that is a distinct calibration question.

These definitions assume a single event endpoint with right censoring. If a competing event changes the outcome definition, cases and controls must be defined for the intended competing-risk estimand rather than automatically treating the competing event as ordinary censoring. Finally, discrimination measured on the data used to fit a high-dimensional multi-omics model can be optimistic. Use independent validation data or appropriately constructed out-of-fold predictions, and keep model development separate from evaluation.

Common pitfall: It is incorrect to assume that censoring is harmless merely because it is independent of event time given some clinical covariates. If it still depends on the prediction score after conditioning on those covariates, observed cases and controls can have distorted score distributions. State \(C\perp(T,R)\mid Z\), with \(Z\) adequate for censoring, and use the corresponding conditional weights. Also do not use \(P(C\geq t\mid Z)\) for a control indicator \(I(U>t)\) when censoring may have an atom at \(t\); the matching probability is \(P(C>t\mid Z)\).

Check Your Understanding

Answer each question, then compare with the brief solutions below.

  1. At horizon \(t\), what are the cumulative cases and controls?
  2. Why must the control weight for \(I(U>t)\) use \(P(C>t\mid Z)\) under the stated boundary convention?
  3. At a threshold, weighted cases above threshold have total weight 18 and all weighted cases have total weight 30. What is estimated sensitivity?
  4. What additional assumption is needed if censoring is independent of event time given clinical covariates but may depend on the score?
  5. Give one reason an incident ROC estimate can be unstable even when the cumulative estimate at that time is not.

Solutions. (1) Cumulative cases satisfy \(T\leq t\); controls satisfy \(T>t\). (2) \(U>t\) requires \(C>t\), so the observation probability is \(P(C>t\mid Z)\), including when censoring has a point mass at \(t\). (3) Sensitivity is \(18/30=0.6000\). (4) Include the score and other relevant predictors in \(Z\), or otherwise justify \(C\perp(T,R)\mid Z\); event-time independence alone does not correct score-dependent selection. (5) Incident estimation uses events in a local time neighborhood, which may contain few events, especially with a narrow bandwidth.

Clinical Biostats