Tutorials › Joint Modeling of Longitudinal and Time-to-Event Data › Calibration of Landmark Risk at Fixed Horizons

Landmarking as an Alternative · Tutorial 648 of 697

Calibration of Landmark Risk at Fixed Horizons

Evaluate agreement between predicted and observed landmark risks at a chosen horizon, and handle censoring without misclassifying patients whose status is known at the horizon.

Intermediate 11 min read

What You'll Learn

  • Define fixed-horizon calibration within the landmark-eligible population.
  • Compare average predicted risk with observed risk and interpret calibration plots.
  • Estimate observed horizon risk using inverse-probability-of-censoring weights.
  • Handle events and censoring exactly at the horizon using explicit endpoint rules.
  • Recognize when censoring adjustment is unreliable and how to quantify uncertainty.
  • Distinguish calibration from discrimination and from a causal interpretation.

What Calibration Means at a Landmark

A landmark prediction is made for a defined group: patients who are alive and event-free at a chosen landmark time and whose required predictor information is available then. Calibration asks whether those predictions agree with subsequent event experience in that group. At a specified horizon, the question is direct: among eligible patients assigned a predicted risk near 20%, is the observed risk by that horizon also near 20%?

Let \(s\) denote the landmark time and \(h>0\) the follow-up horizon after it. For patient \(i\), let \(T_i\) be the event time measured from the study time origin, \(C_i\) the censoring time, and \(X_i(s)\) the predictor information available at the landmark. The patient is landmark-eligible if they are event-free at \(s\) and the information required by the prediction rule is available. A fitted landmark model supplies a predicted probability \(p_i(h)\) of the event during \((s,s+h]\), conditional on eligibility and the information used by that model.

Definition: Fixed-horizon calibration is agreement between predicted probabilities \(p_i(h)\) and the corresponding event probabilities among landmark-eligible patients. In a population calibration curve, \(q(p)\) is the event probability by \(s+h\) among eligible patients whose prediction is \(p\). Ideal calibration satisfies \(q(p)=p\) over the range of predictions being assessed.

Calibration is specific to the landmark population, the time origin, the prediction horizon, and the event definition. A model can be calibrated among patients who reach one landmark but not among all patients at baseline. It can also be calibrated at one horizon and miscalibrated at another. The introductory material on landmark risk establishes why the conditioning set is the landmark-eligible group; calibration evaluates predictions within that set, not in a different population.

Observed Outcomes and the Endpoint Convention

If every eligible patient’s event status through \(s+h\) is known, define \(Y_i(h)=1\) if the event occurs during \((s,s+h]\), and \(Y_i(h)=0\) otherwise. The observed event proportion in a group of \(m\) patients is \(\sum_i Y_i(h)/m\). Compare it with the group’s mean prediction, \(\sum_i p_i(h)/m\). Their difference is an easy-to-interpret calibration summary, but grouping can conceal miscalibration within groups and does not by itself describe the entire calibration curve.

With censoring, some patients’ horizon outcomes are unknown. Write \(U_i=\min(T_i-s,C_i-s)\) for observed follow-up after the landmark, and let \(\Delta_i=1\) if an event is observed and \(\Delta_i=0\) if censoring occurs first. Use the following endpoint convention throughout: an observed event at exactly \(h\) counts as an event by the horizon; a patient censored exactly at \(h\), with no observed event by then, is known to be event-free through \(h\). A patient censored before \(h\) without an event has unknown horizon status.

This convention resolves an important boundary case. Patients with an observed event at \(U_i\leq h\) have a known event outcome. Patients observed event-free through at least \(h\) also have a known outcome. In particular, a patient censored at \(h\) belongs in the latter group, not among patients with unknown status.

Calibration Summaries and Plots

A calibration plot displays observed event risk against predicted risk. For grouped summaries, divide predictions into a small number of prespecified or clearly described groups. Plot each group’s mean prediction on the horizontal axis and its observed event proportion on the vertical axis. The 45-degree line represents ideal agreement. A smooth calibration curve can show patterns that grouping hides; its shape depends on the smoothing method and sample size, so it should not be read as exact at sparsely populated risk levels.

Two compact summaries are often useful. The calibration-in-the-large difference is the overall observed risk minus the overall mean predicted risk. A positive value indicates that observed risk exceeds average predicted risk; a negative value indicates that predictions are higher than observed risk on average. A related recalibration model uses the predicted log odds as an offset:

$$ \operatorname{logit}\{P(Y_i(h)=1)\} =a+\operatorname{logit}\{p_i(h)\}. $$

The ideal offset intercept is \(a=0\). A positive fitted \(a\) indicates that the observed odds tend to be higher than the predicted odds after preserving the predictions’ relative ordering and spacing on the log-odds scale. This offset model adjusts overall level; it does not test whether the spread of predictions is appropriate. A distinct recalibration model estimates both an intercept \(a\) and slope \(b\), replacing the right side with \(a+b\operatorname{logit}\{p_i(h)\}\). Ideal values are \(a=0\) and \(b=1\); a slope below 1 commonly indicates predictions that are too extreme, while a slope above 1 commonly indicates predictions that are not varied enough. These estimates require enough outcome information and variation in predicted risks to be estimable.

Worked Example: Comparing Grouped Predictions With Observed Risk

Suppose six hypothetical landmark-eligible patients have predictions for an event within 12 months after the landmark of \(0.10, 0.20, 0.30, 0.40, 0.50,\) and \(0.60\). Assume follow-up is complete through 12 months. Their event indicators in that order are \(0,0,1,0,1,1\). The complete follow-up assumption means all six horizon outcomes are known.

Across all six patients, the mean predicted risk is \((0.10+0.20+0.30+0.40+0.50+0.60)/6=2.10/6=0.350\). The observed risk is \(3/6=0.500\). Thus the observed-minus-predicted difference is \(0.500-0.350=0.150\), or 15 percentage points. In this hypothetical group, average predictions are lower than the observed event proportion.

For the first three patients, the mean prediction is \((0.10+0.20+0.30)/3=0.200\), and observed risk is \(1/3=0.333\). For the last three, mean prediction is \((0.40+0.50+0.60)/3=0.500\), and observed risk is \(2/3=0.667\). Both groups have observed risk above their mean prediction. These are descriptive comparisons: with only three people per group, they are highly uncertain and should not be treated as precise evidence of systematic miscalibration.

Accounting for Censoring With IPCW

Inverse-probability-of-censoring weighting (IPCW) uses patients with known horizon outcomes to represent patients whose outcomes are unobserved because of earlier censoring. Let \(G_i(t)=P(C_i-s\geq t\mid Z_i)\), where \(Z_i\) is a set of variables sufficient to make censoring independent of event time, conditional on those variables. Under independent censoring given \(Z_i\), correct estimation of \(G_i(t)\), and positivity \(G_i(t)>0\) over the time range used, an observed outcome with probability \(G_i(t)\) of remaining observable can be weighted by \(1/G_i(t)\).

For a marginal observed risk in the landmark cohort, an illustrative IPCW estimator is:

$$ \widehat{R}_{\mathrm{IPCW}}(h)= \frac{ \displaystyle\sum_i \frac{\mathbb{1}(U_i\leq h,\ \Delta_i=1)}{\widehat{G}_i(U_i)} }{ \displaystyle\sum_i \left[ \frac{\mathbb{1}(U_i\leq h,\ \Delta_i=1)}{\widehat{G}_i(U_i)} + \frac{\mathbb{1}(U_i>h\ \text{or}\ (U_i=h,\Delta_i=0))}{\widehat{G}_i(h)} \right] }. $$

Here \(\widehat{G}_i\) estimates the probability of remaining uncensored through the stated time, using the same “greater than or equal to” convention in the definition of \(G_i\). The event term includes observed events at \(h\). The event-free term includes patients followed beyond \(h\) without an event by \(h\), and patients censored exactly at \(h\) without an event. Patients censored before \(h\) without an event contribute to neither term because their horizon status is unknown. If the censoring-time distribution is continuous, ties at \(h\) are usually absent; with recorded-time ties, the endpoint convention must still be explicit.

The justification is inverse-probability weighting. If an event by \(h\) is observed at time \(u\), it is observed with probability \(G_i(u)\) under the censoring assumption; multiplying its observation indicator by \(1/G_i(u)\) removes that observation probability in expectation. Likewise, a known event-free outcome through \(h\) is observed with probability \(G_i(h)\), so its weighted contribution uses \(1/G_i(h)\). Summing the weighted event and event-free contributions estimates the corresponding outcome totals; their ratio estimates the event proportion. Estimation of \(G_i\) may use a censoring survival estimate, or a conditional model when censoring depends on measured predictors. The form of the estimator must match the censoring assumptions and the target population.

Worked Example: IPCW With a Patient Censored at the Horizon

Consider five hypothetical patients at a 12-month horizon. Their observed data are: A has an event at 4 months; B has an event at 10 months; C is observed event-free through 15 months; D is censored at exactly 12 months without an event; and E is censored at 8 months without an event. Suppose the estimated censoring survival probabilities are \(\widehat{G}(4)=0.80\), \(\widehat{G}(10)=0.50\), and \(\widehat{G}(12)=0.40\). These values are decreasing with time, as a censoring survival probability should be.

A contributes an event weight \(1/0.80=1.25\). B contributes an event weight \(1/0.50=2.00\). C contributes an event-free weight \(1/0.40=2.50\), because C is observed through 12 months without an event by that horizon. D also contributes an event-free weight \(1/0.40=2.50\): under the stated endpoint convention, D’s event-free status through 12 months is known. E contributes neither weight because censoring at 8 months leaves the 12-month outcome unknown.

Therefore, \(\widehat{R}_{\mathrm{IPCW}}(12)=(1.25+2.00)/(1.25+2.00+2.50+2.50)=3.25/8.25=0.394\). The estimated 12-month event risk is 39.4% in this hypothetical example. Excluding D would incorrectly discard a known event-free outcome and produce \(3.25/(1.25+2.00+2.50)=0.565\). That difference shows why endpoint handling at \(h\) is not merely a technical detail.

Worked Example: Interpreting an Offset Calibration Intercept

Suppose five hypothetical eligible patients all receive a predicted 12-month risk of \(0.25\), and two experience the event by 12 months, with complete outcome ascertainment. The observed risk is \(2/5=0.40\), which exceeds the mean prediction \(0.25\) by 0.15, or 15 percentage points.

For an offset calibration model, the fitted intercept in this constant-prediction example is the difference between the observed and predicted log odds: \(\operatorname{logit}(0.40)-\operatorname{logit}(0.25) =\log(0.40/0.60)-\log(0.25/0.75) =\log(2/3)-\log(1/3)=\log(2)=0.693\). The positive intercept signals higher observed than predicted odds. A calibration slope cannot be estimated here because all predictions are identical: there is no variation in predicted log odds from which to estimate a slope. The example also illustrates why a calibration intercept and a risk difference are different summaries, expressed on different scales.

Uncertainty, Diagnostics, and Alternatives

Calibration summaries are estimates, not exact properties established by a plot. Confidence intervals for grouped observed risks or for a calibration parameter communicate sampling uncertainty. When model fitting, prediction, and evaluation involve resampling or data splitting, uncertainty procedures should respect the subject as the sampling unit. In IPCW analyses, uncertainty should also reflect estimation of the censoring distribution; a subject-level bootstrap that repeats the relevant estimation steps is one practical approach. Large or highly variable weights signal that few patients remain observable at some times. Truncating extreme weights may stabilize estimates, but changes the procedure and can introduce bias; report the choice and examine sensitivity.

Useful checks include confirming that every prediction and outcome refers to the same landmark and horizon, verifying event and censoring time conventions, inspecting numbers at risk near \(h\), and checking whether \(\widehat{G}(t)\) approaches zero. Compare calibration across clinically relevant risk ranges, but avoid creating many tiny groups. If censoring differs by measured patient characteristics, an unconditional censoring Kaplan–Meier estimate may be inadequate; use a defensible conditional censoring model or an appropriate stratified approach. If censoring is informative even after conditioning on measured variables, IPCW does not automatically solve the problem.

Grouped observed-versus-predicted summaries are transparent and easy to communicate, but depend on grouping and are noisy in small samples. A smooth curve uses information across prediction values, but can obscure sparse regions and depends on smoothing choices. Calibration-in-the-large compresses overall agreement into one number and can miss offsetting errors across risk levels. The two-parameter intercept-and-slope assessment adds information about scale but still cannot describe every nonlinear departure. These approaches complement one another; none replaces inspection of the underlying data and uncertainty.

Calibration is not discrimination. A model can rank patients well while systematically overpredicting risk, or be calibrated on average while failing to separate higher- from lower-risk patients. Discrimination is a separate evaluation target. Calibration also does not establish that a predictor causes an event or that acting on a prediction improves outcomes. The estimated agreement pertains to the landmark-eligible population and setting represented in the validation data. Changes in eligibility, predictor measurement, clinical practice, or event incidence can alter calibration.

Common Pitfalls

  • Dropping patients censored exactly at the horizon. That discards a known event-free outcome under the endpoint convention used here. Include such patients in the event-free IPCW term, with the horizon censoring-survival weight.
  • Counting a censored-before-horizon patient as event-free. Without event observation or follow-up through \(h\), the patient’s horizon outcome is unknown; simply coding them as a non-event biases the observed risk downward.
  • Using the wrong denominator. For a calibration plot, each group’s observed risk must represent the same landmark-eligible group and horizon as the predictions, with censoring addressed when needed.
  • Equating a small calibration difference with good calibration everywhere. Overall errors can cancel. Inspect calibration across the prediction range and report uncertainty.
  • Calling a prediction causal. Calibration measures agreement between predicted and observed risks; it does not show that changing a predictor would change a patient’s outcome.
Key takeaway: Evaluate fixed-horizon risk only among the patients eligible at the landmark, and align predictions, event definitions, and follow-up windows. With censoring, distinguish unknown outcomes from outcomes known through the horizon—including censoring exactly at the horizon—and use censoring weights only when their assumptions are credible.

Check Your Understanding

Answer each question, then compare with the solutions below.

  1. A landmark model predicts 12-month risks for patients who are event-free at time \(s\). What population does its calibration target refer to?
  2. At a 6-month horizon, a patient has no event and is censored at exactly 6 months. Under the endpoint convention in this tutorial, is the horizon outcome known, and how does the patient enter the IPCW estimator?
  3. In a complete-outcome validation group, mean predicted risk is 0.30 and observed risk is 0.22. What is the observed-minus-predicted calibration-in-the-large difference, and what does its sign indicate?
  4. Why can a calibration slope not be estimated when all patients have the same predicted probability?
  5. Name one condition required for IPCW and one diagnostic that may reveal instability.

Solutions. (1) It refers to patients who meet the landmark eligibility criteria at \(s\), not all patients at baseline. (2) The outcome is known to be event-free through 6 months if no event was observed by then; include the patient in the event-free IPCW term with weight \(1/\widehat{G}(6)\). (3) The difference is \(0.22-0.30=-0.08\), or minus 8 percentage points, indicating that average predicted risk exceeds observed risk in this group. (4) A slope requires variation in predicted log odds; identical predictions provide none. (5) One required condition is independent censoring conditional on the variables used in the censoring model, along with positive probability of remaining uncensored. A diagnostic is checking for very large weights or censoring survival probabilities near zero.

Clinical Biostats