Tutorials › Joint Modeling of Longitudinal and Time-to-Event Data › Temporal Validation of Joint-Model Predictions

Calibration and Prediction Validation · Tutorial 575 of 697

Temporal Validation of Joint-Model Predictions

Learn how to evaluate joint-model predictions in a later time period without confusing temporal changes in the population or care with model performance.

Advanced 11 min read

What You'll Learn

  • Define a temporal validation cohort and freeze the model before evaluating later patients.
  • Align landmark times, prediction horizons, and outcome definitions across calendar periods.
  • Estimate horizon-specific prediction error when outcomes are censored before the horizon.
  • Interpret calibration and prediction scores in the later cohort.
  • Investigate changes in case mix, measurement practice, and treatment as potential sources of performance drift.
  • Recognize leakage, inadequate follow-up, and censoring-positivity problems that can invalidate temporal validation.

Why Validate Predictions Over Calendar Time?

A joint model may perform well when assessed among patients drawn from the same period used to develop it, yet work less well after clinical practice or the patient population changes. A model’s predictions can be affected by shifts in disease severity, laboratory measurement, treatment, follow-up, or the way patients enter care. Temporal validation asks whether predictions from a model developed in an earlier calendar period remain accurate for eligible patients seen later.

The key design feature is chronology: all choices that define the model must be made using information available before the validation period begins. The fitted model is then applied to the later cohort without using their future outcomes to choose or alter it. This evaluates performance in a relevant later setting; it does not, by itself, show why performance changed or establish that a change in care caused a change in outcomes.

Definition: In temporal validation, a prediction model is developed and fixed using an earlier calendar-time sample, then evaluated in a separate, later calendar-time sample. For a joint model, predictions for a patient at a specified landmark use the longitudinal history and other information available by that landmark. Later outcomes are used to evaluate the predictions, not to construct them.

Specify the Prediction Target Before Scoring

Let \(t_0\) be the prediction landmark and \(\tau\) the prediction horizon after that landmark. For patient \(i\), let \(T_i\) denote the event time, \(C_i\) the censoring time, and \(H_i(t_0)\) the longitudinal history available by \(t_0\). A fixed joint model produces a predicted event risk \(r_i(\tau)=P(T_i-t_0\leq\tau\mid T_i>t_0,H_i(t_0))\). The target is the risk over the next \(\tau\) time units among patients who are event-free and eligible at \(t_0\). The landmark, eligibility rules, event definition, and horizon must be the same in development and validation, unless a difference is explicitly part of the evaluation question.

For example, a model developed using annual marker measurements cannot be evaluated as if a later cohort had the same information if its markers are collected every three months or only when symptoms worsen. The prediction procedure must be implementable using the later patient’s information available at the landmark, with measurement units and timing handled consistently. If data from after \(t_0\) enter the predictor, the evaluation has information leakage and does not represent a genuine prediction at \(t_0\).

A later cohort needs enough follow-up to evaluate the chosen horizon. Censoring before \(\tau\) means that the patient’s horizon outcome may be unknown; it is not correct to label that patient event-free through \(\tau\). The censoring process must therefore be addressed when estimating performance.

Assumptions for censoring-adjusted horizon scores: Conditional on specified censoring-model variables \(Z_i\), censoring is independent of the event time and the horizon outcome; the censoring survival probability is correctly estimated; and it is positive over the times and covariate patterns used in the score. These assumptions permit weighting observed outcomes to represent outcomes that would have been observed without censoring. They do not correct for an incorrectly specified joint model or for information leakage.

Scoring Predictions With Censored Follow-Up

Define the residual event time \(U_i=T_i-t_0\), residual censoring time \(V_i=C_i-t_0\), observed residual follow-up \(\tilde U_i=\min(U_i,V_i)\), and event indicator \(\delta_i=I(U_i\leq V_i)\). The observed time \(\tilde U_i\), rather than the unknown \(U_i\), is essential: for a patient censored before an event, the true event time is not available. Let \(G(u\mid Z_i)\) be the probability of remaining uncensored through residual time \(u\), conditional on \(Z_i\). An inverse-probability-of-censoring-weighted Brier score at horizon \(\tau\) is

$$ \widehat{\mathrm{BS}}(\tau)=\frac{1}{n}\sum_{i=1}^{n} \left[ \frac{I(\tilde U_i\leq\tau,\delta_i=1)}{\widehat G(\tilde U_i-\mid Z_i)} (1-r_i(\tau))^2 + \frac{I(\tilde U_i>\tau)}{\widehat G(\tau\mid Z_i)} r_i(\tau)^2 \right]. $$

An observed event by \(\tau\) has horizon outcome one, so its squared prediction error is \((1-r_i(\tau))^2\). A patient observed event-free past \(\tau\) has outcome zero, giving squared error \(r_i(\tau)^2\). A patient censored before \(\tau\) without an event contributes neither observed-outcome term: their horizon outcome is unknown. The weights compensate for the fact that, under the censoring assumptions, observed cases represent patients with similar \(Z_i\) who were censored.

Why the Censoring Weights Work

The weighting argument can be seen by considering the event contribution. Conditional on an event time \(U_i=u\) and censoring variables \(Z_i\), the probability that the event is observed is \(G(u-\mid Z_i)\), using the left limit to handle event-time conventions. Thus the conditional expected weighted event indicator is

$$ E\left[ \left. \frac{I(\tilde U_i\leq\tau,\delta_i=1)} {G(\tilde U_i-\mid Z_i)} \right|U_i=u,Z_i \right] = \frac{I(u\leq\tau)P(V_i\geq u\mid Z_i)} {G(u-\mid Z_i)} =I(u\leq\tau). $$

The equality uses conditional independent censoring and the definition of \(G\). Similarly, for someone event-free past \(\tau\), observation beyond \(\tau\) occurs with probability \(G(\tau\mid Z_i)\), so weighting by its reciprocal recovers the event-free-through-\(\tau\) contribution. Multiplying these indicators by their squared errors and averaging therefore estimates the horizon Brier loss under the stated assumptions. If some \(G\) values are near zero, the weights can be very large, making the estimate unstable; weighting does not create information where almost no comparable patients remain under observation.

Worked Example: An IPCW Brier Score in a Later Cohort

Suppose four hypothetical patients are evaluated at a two-year horizon. Their predicted risks and observed follow-up are listed below. For simplicity, assume the stated censoring survival probabilities are known and the censoring assumptions hold.

PatientPredicted risk\(\tilde U_i\) (years)\(\delta_i\)Relevant \(\widehat G\)
10.401.01\(\widehat G(1.0-\mid Z_i)=0.80\)
20.202.50\(\widehat G(2.0\mid Z_i)=0.75\)
30.501.50Censored before two years
40.102.51\(\widehat G(2.0\mid Z_i)=0.80\)

Patient 1 had an observed event by two years. Their weighted contribution is \((1-0.40)^2/0.80=0.36/0.80=0.4500\). Patient 2 was observed beyond two years without an event, so the contribution is \(0.20^2/0.75=0.0400/0.75=0.05333\). Patient 3 was censored at 1.5 years without an event and has an unknown two-year outcome, so neither indicator in the score is one; this patient contributes zero to the displayed sum, not a known non-event error.

Patient 4 was observed event-free beyond two years, so the contribution is \(0.10^2/0.80=0.0100/0.80=0.01250\). The estimated score is therefore \((0.4500+0.05333+0+0.01250)/4=0.12896\). This small illustrative sample is not a stable estimate of model performance. The calculation shows how observed time, event status, and censoring weights determine each contribution.

Read Temporal Performance in Context

Use complementary summaries rather than treating one score as a complete verdict. Calibration asks whether predicted risks agree with event frequencies; the Brier score measures squared error and reflects both calibration and separation of risks. A log score is another proper scoring rule, but can be especially sensitive to predictions close to zero or one. The earlier material on calibration and prediction scores defines these measures in detail; the temporal question is whether they remain satisfactory in the later cohort.

When outcomes are fully observed at the horizon, the mean predicted risk can be compared with the observed event proportion. With censoring, observed-to-expected comparisons and calibration assessments require suitable censoring adjustment. A rise in average predicted risk alone does not imply worse calibration: it may reflect a higher-risk case mix. Conversely, similar average predictions can hide important miscalibration across the range of risk. Report the cohort’s event incidence and follow-up context alongside the chosen calibration and overall accuracy summaries.

Worked Example: Separating Risk Mix From Calibration Error

Consider two hypothetical cohorts assessed at the same one-year horizon with the same frozen model. In the earlier cohort, the mean predicted risk was 0.10 and 10 of 100 patients had the event, so the observed proportion was \(10/100=0.10\). In the later cohort, patients were more clinically severe on average: the mean predicted risk was 0.18, and 20 of 100 had the event, giving an observed proportion of \(20/100=0.20\).

For the later cohort, the simple fully observed observed-to-expected ratio is \(20/(100\times0.18)=20/18=1.111\). The cohort had about 11.1% more observed events than expected from the mean predicted risk. This indicates aggregate underprediction in this hypothetical cohort, but it does not establish that the model’s errors grew by 11.1% because of a particular practice change. The higher mean predicted risk already reflects the changed case mix; the remaining observed-versus-expected difference is a separate calibration signal.

This comparison assumes complete one-year outcome ascertainment and comparable eligibility and outcome definitions. With censoring before one year, the raw count of observed events divided by expected events would not generally estimate the same comparison; use a censoring-adjusted method. A good aggregate match would also not prove individual-level calibration, since underprediction for some patients can offset overprediction for others.

Investigate What Changed, Without Overinterpreting

A temporal performance change is a signal to investigate, not a diagnosis. Review the later cohort’s risk distribution and clinical characteristics; the timing, frequency, units, and missingness of longitudinal measurements; treatment patterns; outcome ascertainment; and censoring. For example, treatment may have become more common after a high-risk prediction. If the model does not account for that treatment change, predicted risks may differ from subsequent observed risks. That discrepancy is predictive, not evidence that treatment caused the change: treatment selection and disease severity may be related.

Performance can also appear to change because measurement procedures or eligibility definitions changed. A marker measured by a new assay may have a different scale; a more intensive schedule may reveal worsening sooner; or a revised event definition may alter incidence. These are not merely statistical nuisances. They determine whether the predictions being evaluated correspond to the same inputs and outcome target.

A temporal split differs from a random split or ordinary cross-validation: it deliberately tests forward in calendar time, where practice and case mix may drift. It is not the same design as evaluating a model in an independent cohort. If performance is inadequate, investigate the source and plan any model updates separately; evaluating an updated model on the same later outcomes used to tune it would no longer provide an untouched temporal assessment.

Diagnostics, Failure Modes, and Limitations

  • Information leakage: Using post-landmark measurements, later outcome information, or validation outcomes to select or modify the model makes the evaluation optimistic. Reconstruct the prediction using only information available at \(t_0\), and freeze all model choices before scoring.
  • Misaligned targets: Different landmarks, horizons, eligibility rules, event definitions, or measurement units can make the two calendar periods incomparable. State and verify these definitions before comparing performance.
  • Unstable censoring weights: Very small estimated \(G\) values produce large weights and noisy scores. Inspect the censoring survival estimates and weight distribution, and report when the horizon is poorly supported by follow-up. Truncating weights changes the estimator and should be disclosed, not treated as a cure for absent follow-up.
  • Case mix mistaken for model drift: A changed event rate or mean predicted risk may result from a different patient population. Describe the later cohort and interpret calibration and prediction scores alongside those changes.
  • Uncertain explanations: Calendar time bundles many changes. Temporal validation can detect performance differences but cannot isolate a causal effect of measurement, treatment, or policy without an appropriate causal design.

Temporal validation is limited to the later population, care setting, follow-up, and prediction target observed. A single later cohort may not represent future practice, and a censoring-adjusted score remains dependent on its censoring assumptions. These limitations do not make temporal validation unhelpful: its value is that it tests a frozen prediction procedure against a realistic forward-time challenge.

Key takeaway: Define a common landmark and horizon, freeze the joint model before the later period, and evaluate only with information available at prediction time. Use censoring-adjusted metrics when outcomes are incomplete, then interpret any performance change alongside case mix, measurements, treatment, and outcome ascertainment.

Check Your Understanding

Answer each question, then compare your reasoning with the solutions below.

  1. A patient is censored 10 months after the landmark, without an event, in an evaluation of one-year risk. Can their outcome be coded as event-free at one year? Why?
  2. In a hypothetical cohort of 200 patients with complete one-year follow-up, mean predicted risk is 0.12 and 30 patients experience the event. Calculate the observed-to-expected ratio and interpret it.
  3. Why must a model be frozen before outcomes in the later calendar period are examined?
  4. Name two changes in clinical data or care that could affect temporal performance without necessarily indicating a change in the fitted model’s parameters.

Solutions. (1) No. Their one-year outcome is unknown because follow-up ended before the horizon and no event was observed; they are censored, not known event-free. (2) Expected events are \(200\times0.12=24\), so the ratio is \(30/24=1.250\). The cohort had 25.0% more observed events than expected from the mean predicted risk, under the stated complete-follow-up conditions. (3) If later outcomes influence model selection or modification, the evaluation data are no longer untouched and the reported performance can be optimistic. (4) Examples include a change in marker assay or measurement frequency, a shift in treatment practice, changed patient severity, or a change in event ascertainment. Such changes require investigation; temporal validation alone cannot determine which caused a performance difference.

Clinical Biostats