Tutorials › Joint Modeling of Longitudinal and Time-to-Event Data › Calibration-In-The-Large

Calibration and Prediction Validation · Tutorial 561 of 697

Calibration-In-The-Large

You will estimate the average predicted-minus-observed event risk at a fixed horizon and interpret what its sign says about systematic overprediction or underprediction.

Advanced 10 min read

What You'll Learn

  • Define calibration-in-the-large as a marginal difference in predicted and observed event risk at a fixed horizon.
  • Estimate the cohort’s observed event risk when some event statuses are censored before the horizon.
  • Explain the assumptions and weighting identities underlying inverse-probability-of-censoring weighting.
  • Interpret the sign and size of the average difference in percentage points.
  • Recognize why an average difference can conceal individual-level or subgroup miscalibration.
  • Diagnose positivity problems, censoring-model concerns, and common complete-case errors.

What Calibration-in-the-Large Measures

A survival prediction made at a specified prediction origin often concerns the probability of an event occurring within a fixed horizon. For example, a joint model may predict a patient's risk of an event during the next year, conditional on the patient's longitudinal history available at that origin. When these predictions are evaluated in a validation cohort, a basic question is whether their average agrees with the cohort's average event risk.

This comparison is calibration-in-the-large. It is a marginal check: it compares average predicted risk with average observed risk, rather than asking whether every prediction is accurate or whether the relationship between predicted and observed risks has a particular shape. The introductory material on horizon-specific calibration plots describes visual calibration checks; here the focus is the signed average difference, including how to estimate observed risk when outcomes are censored.

Definition: Fix a prediction origin and horizon \(\tau\). Let \(p_i(\tau)\) be subject \(i\)'s predicted probability of experiencing the event by \(\tau\), based only on information available at the prediction origin. Let \(B_i(\tau)=I(T_i\leq\tau)\) indicate whether the event truly occurs by that horizon. Define the population calibration-in-the-large difference as \[ \Delta(\tau)=E\{p_i(\tau)\}-E\{B_i(\tau)\}. \] A positive \(\Delta(\tau)\) means average predicted risk exceeds average event risk: the predictions overpredict on average. A negative value means they underpredict on average. The difference is measured in probability units, often reported in percentage points.

The sign convention matters. This tutorial uses predicted minus observed, so positive values indicate overprediction. Some reports use the reverse subtraction; whenever a result is presented, state the convention explicitly. A value near zero indicates agreement of the two marginal means, not that each person's prediction is accurate, nor that risks are calibrated at every prediction level.

Observed Event Risk With Censoring

If every subject's event status at \(\tau\) is known, estimate the observed event risk by the sample proportion with an event by that horizon. With right censoring, a subject censored before \(\tau\) has unknown event status at \(\tau\). Treating that subject as event-free, or simply dropping all such subjects, can distort the estimate.

Write \(T_i\) for the event time, \(C_i\) for the censoring time, \(Y_i=\min(T_i,C_i)\) for the observed follow-up time, and \(\delta_i=I(T_i\leq C_i)\) for the event indicator. Let \(Z_i\) denote the observed variables used to model censoring. A status at \(\tau\) is ascertained if the event is observed by \(\tau\), or if the subject is known to be event-free through \(\tau\). Define \(R_i(\tau)=1\) in either case and \(R_i(\tau)=0\) when censoring occurs before \(\tau\) without an observed event. Thus, when \(\delta_i=1\) and \(Y_i\leq\tau\), the event status is observed; when \(Y_i\geq\tau\) with no event by \(\tau\), the subject is known to be event-free through the horizon.

Let \(G(t\mid Z_i)=P(C_i\geq t\mid Z_i)\) be the conditional censoring survival function. Under conditional independent censoring, the probability that a status is ascertained depends on its event information: for an event by \(\tau\), it is \(G(T_i-\mid Z_i)\); for a subject event-free through \(\tau\), it is \(G(\tau\mid Z_i)\). Denote this probability by \(\pi_i\) for the relevant case. The left limit \(G(T_i-\mid Z_i)\) accommodates the event being observed at its event time; the handling of tied event and censoring times must be specified consistently in an application.

Assumptions for censoring-adjusted estimation: The censoring mechanism is independent of the event time, conditional on the observed censoring variables \(Z_i\), or on a sufficiently rich observed history if that is the chosen censoring model. Each target subject has positive probability of having status ascertained by \(\tau\), so the relevant \(\pi_i\) values are greater than zero. The validation cohort represents the population to which the average risk refers, and the predictions are available for the cohort at the stated prediction origin. In practice, an estimated censoring model must adequately estimate the required probabilities.

Under these assumptions, an inverse-probability-of-censoring weighted (IPCW) estimator of observed event risk is

$$ \widehat O(\tau)=\frac{1}{n}\sum_{i=1}^{n} \frac{R_i(\tau)B_i(\tau)}{\widehat\pi_i}. $$

Only observed events by \(\tau\) contribute to the numerator. A subject censored before the horizon contributes zero because \(R_i(\tau)=0\); an observed event contributes its event indicator divided by the probability that it would have been ascertained. The cohort size \(n\), rather than the number of uncensored subjects, is the denominator. The corresponding estimate of calibration-in-the-large is

$$ \widehat\Delta(\tau) = \frac{1}{n}\sum_{i=1}^{n}p_i(\tau)-\widehat O(\tau). $$

Why the IPCW Estimate Targets Event Risk

The weighting justification requires conditioning on the complete event information and \(Z_i\), not just on the observed follow-up time. Conditional on \(T_i\) and \(Z_i\), the probability of ascertainment is \(\pi_i\): it is \(G(T_i-\mid Z_i)\) for an event by \(\tau\), and \(G(\tau\mid Z_i)\) for someone who remains event-free through \(\tau\). Conditional independent censoring therefore gives \(E\{R_i(\tau)\mid T_i,Z_i\}=\pi_i\).

Since \(B_i(\tau)\) is determined by \(T_i\), it is fixed when conditioning on \(T_i,Z_i\). Consequently,

$$ E\left\{\left.\frac{R_i(\tau)B_i(\tau)}{\pi_i}\right|T_i,Z_i\right\} = \frac{B_i(\tau)}{\pi_i}E\{R_i(\tau)\mid T_i,Z_i\} = B_i(\tau). $$

Averaging over \(T_i,Z_i\) shows that the weighted event contribution has expectation \(E\{B_i(\tau)\}\), the target event risk. Similarly, \(E\{R_i(\tau)/\pi_i\mid T_i,Z_i\}=1\), which explains why a ratio version with a weighted denominator can also be consistent under suitable conditions. The estimator displayed above uses the fixed cohort denominator \(n\). With estimated censoring probabilities, its performance additionally depends on the censoring model being adequately estimated; the finite-sample estimate need not equal the target exactly.

Worked Example: Complete Follow-Up at the Horizon

Suppose four hypothetical validation subjects have fully observed event status at a one-year horizon. Their predicted one-year risks are \(0.10, 0.20, 0.30,\) and \(0.40\). The observed event indicators are \(0,0,1,\) and \(0\).

There is no censoring before one year, so each status is observed and no censoring adjustment is needed. The mean predicted risk is \[ \frac{0.10+0.20+0.30+0.40}{4}=\frac{1.00}{4}=0.25. \] The observed event risk is \[ \frac{0+0+1+0}{4}=\frac{1}{4}=0.25. \] Therefore, \[ \widehat\Delta(1\text{ year})=0.25-0.25=0. \] In this hypothetical cohort, mean predicted risk equals observed event risk at one year. This agreement does not show that all four predictions are individually accurate or that calibration holds at every risk level.

Worked Example: IPCW With Early Censoring

Consider five hypothetical subjects validated at horizon \(\tau\). For this illustration, assume the censoring probabilities are known. Two subjects have observed events by \(\tau\), one is known to be event-free through \(\tau\), and two are censored before \(\tau\) without an observed event.

SubjectPredicted riskStatus at \(\tau\)\(R_i(\tau)\)\(\pi_i\), if ascertained
A0.20Event observed by \(\tau\)10.80
B0.30Event observed by \(\tau\)10.50
C0.40Event-free through \(\tau\)10.75
D0.20Censored before \(\tau\)0Not ascertained
E0.40Censored before \(\tau\)0Not ascertained

The mean predicted risk is \((0.20+0.30+0.40+0.20+0.40)/5=1.50/5=0.30\). For the observed-risk estimate, subject A contributes \(1/0.80=1.25\), and subject B contributes \(1/0.50=2.00\). Subject C is event-free through the horizon and contributes zero to the event numerator; D and E have \(R_i(\tau)=0\) and also contribute zero. Thus, \[ \widehat O(\tau)=\frac{1.25+2.00}{5}=0.65, \qquad \widehat\Delta(\tau)=0.30-0.65=-0.35. \] The estimated average predicted risk is 35 percentage points below the IPCW estimated event risk, indicating underprediction on average in this hypothetical sample. The high estimate from only five subjects illustrates that IPCW estimates can be unstable in small samples; it should not be treated as a precise population value.

Interpretation, Diagnostics, and Alternatives

Report the sign convention, horizon, units, and the two averages being compared. For example, a difference of \(0.04\) under the predicted-minus-observed convention means that average predicted risk exceeds estimated observed risk by 4 percentage points at the specified horizon. It does not mean that every subject's predicted risk is 4 percentage points too high. Nor does it establish why the difference arose: it may reflect prediction-model error, a difference between the validation and development populations, or uncertainty in estimating observed risk.

Several checks are especially important when censoring is present:

  • Check horizon and prediction origin. Predictions and outcomes must refer to the same origin and follow-up interval. A prediction made using information recorded after that origin does not represent the intended forecast.
  • Check ascertainment and censoring probabilities. Very small \(\widehat\pi_i\) values create large weights and can make the estimate sensitive to a few subjects. Inspect the distribution of weights and whether important censoring predictors are represented in \(Z_i\).
  • Check who remains observable. If censoring depends on event risk after conditioning on the variables in the censoring model, IPCW does not generally recover the target risk. A plausible model and adequate follow-up are substantive requirements, not just computational details.
  • Do not infer a pattern from one average. Equal mean predicted and observed risk can hide offsetting overprediction and underprediction. A calibration plot can reveal patterns that a single summary cannot.

The simplest alternative when all outcomes are known by \(\tau\) is the unweighted event proportion, as in the first example. When censoring before \(\tau\) is present, the proportion among only those with known status is generally not a valid substitute: ascertainment may select subjects with different event risks. IPCW instead adjusts observed contributions using estimated ascertainment probabilities, under its assumptions. It can become unstable when those probabilities are small, and misspecification of the censoring model can bias the result.

Calibration-in-the-large is also narrower than a calibration curve: it summarizes only the difference in marginal means. A curve can show how observed risk varies across predicted risks, while a zero average difference alone cannot. Neither summary by itself establishes good discrimination. The mean difference is therefore useful as a compact diagnostic, but should be interpreted alongside other validation evidence rather than as a complete assessment of prediction quality.

Common Mistakes and Limitations

Common mistake: “The two censored subjects did not have an observed event, so count them as event-free and average the observed indicators.” This treats unknown status before \(\tau\) as known absence of an event and can bias observed risk downward. The correction is to use a censoring-adjusted estimate under stated censoring and positivity assumptions, or to restrict the target horizon and cohort so status is known by that horizon.

A second mistake is to describe a negative predicted-minus-observed difference as overprediction. Under the convention defined here, a negative difference means average predicted risk is lower than observed risk: underprediction. Another is to interpret a result near zero as proof of individual-level calibration. The statistic checks only equality of marginal averages; substantial errors in opposite directions can cancel. Finally, a weighted estimate is not automatically reliable merely because a formula was applied. If censoring probabilities are poorly estimated or close to zero, the estimate may be biased or highly variable.

The target population also matters. The predictions should be evaluated in a cohort relevant to the intended use, and their mean should be computed on the same set of validation subjects used to estimate observed risk. Differences in eligibility, prediction time, or follow-up definitions can turn an apparent calibration problem into a mismatch of estimands. Calibration-in-the-large describes average agreement for the specified population and horizon; it does not guarantee transportability to another population or another prediction horizon.

Worked Example: Opposing Errors Can Cancel

In a hypothetical fully observed cohort of four subjects, predicted risks are \(0.20,0.20,0.60,\) and \(0.60\), while the event indicators by \(\tau\) are \(0,0,1,\) and \(1\). The mean prediction is \[ \frac{0.20+0.20+0.60+0.60}{4}=0.40, \] and the observed event risk is \[ \frac{0+0+1+1}{4}=0.50. \] Thus the predicted-minus-observed difference is \(0.40-0.50=-0.10\), or \(-10\) percentage points, indicating underprediction on average. Yet the first two predictions average \(0.20\) while their observed event proportion is \(0\), so they overpredict in that pair; the last two predictions average \(0.60\) while their observed event proportion is \(1\), so they underpredict in that pair. The overall difference summarizes the net average discrepancy and does not expose both opposing patterns.

Check Your Understanding

Answer each question before reading the solutions.

  1. Using the predicted-minus-observed convention, what does a calibration-in-the-large estimate of \(0.03\) mean?
  2. At a fixed horizon, four fully observed subjects have predicted risks \(0.10,0.20,0.30,0.40\), and event indicators \(0,1,0,0\). Calculate the mean difference and interpret its sign.
  3. Why should a subject censored before \(\tau\), without an observed event, not simply be coded as event-free at \(\tau\)?
  4. An observed event by \(\tau\) has ascertainment probability \(0.50\). What is its IPCW event contribution before division by the cohort size?
  5. Can a calibration-in-the-large estimate of zero establish that predictions are accurate at every risk level? Explain.

Solutions. (1) Average predicted risk is 3 percentage points higher than observed event risk at the stated horizon, so the cohort shows average overprediction. (2) Mean predicted risk is \((0.10+0.20+0.30+0.40)/4=0.25\); observed risk is \(1/4=0.25\); the difference is \(0\), indicating equal averages in this sample. (3) Censoring before \(\tau\) leaves event status at \(\tau\) unknown, so coding the subject as event-free can distort estimated risk. (4) The event contribution is \(1/0.50=2\); the estimator then divides the sum of contributions by \(n\). (5) No. Opposing errors can cancel in the marginal mean, so a zero difference does not establish calibration across risk levels or for individual subjects.

Clinical Biostats