Tutorials › Model-Informed Drug Development (MIDD) › Fan Charts for Time-Varying Clinical Predictions

Communicating Uncertainty and Sensitivity of Decisions · Tutorial 425 of 596

Fan Charts for Time-Varying Clinical Predictions

Build and interpret fan charts that show how clinical predictions and their uncertainty change over time, without confusing pointwise bands with whole-trajectory guarantees.

Intermediate 11 min read

What You'll Learn

  • Define a fan chart from simulated predictive trajectories at prespecified time points.
  • Select and label a central estimate and nested pointwise quantile bands.
  • Overlay a clinical threshold and calculate the simulated proportion meeting it at a specified time.
  • Distinguish a pointwise prediction from a probability about crossing a threshold over time.
  • Check whether the displayed uncertainty reflects the intended sources of variation.
  • Identify common graphical and interpretation failures in longitudinal prediction displays.

Why Display Predictions Over Time?

A clinical prediction is often not a single number. A biomarker may change over weeks after treatment begins, and the uncertainty around its predicted value may widen, narrow, or shift as time passes. A fan chart displays that evolution in one figure: a central prediction runs through time, while nested bands show selected ranges of predictive values at each time. A horizontal reference line can mark a clinically meaningful threshold.

This display is useful only when its components are defined. The central curve might show a mean or median, and the shaded bands might show quantiles of a predictive distribution. Those choices answer different questions. The chart must also make clear whether its predictions concern a typical individual, a new individual, or a population-level quantity. The display itself does not decide which uncertainty is relevant; that comes from the prediction target and the model.

Definition: A fan chart is a time-indexed display of a central prediction and nested uncertainty bands derived from a specified predictive distribution. A pointwise band at time \(t\) summarizes predictive values at that time; it does not, by itself, give a coverage guarantee for the full trajectory across all times.

Constructing the Chart

Let \(Y(t)\) denote the clinical outcome at time \(t\), and let \(Y^{(m)}(t)\) be the prediction from simulation draw \(m\), for \(m=1,\ldots,M\). The simulated draws should represent the uncertainty relevant to the decision. For example, a prediction for a new patient may include both uncertainty in model parameters and between-patient variability. A prediction for a population mean instead targets uncertainty in that population-level quantity. These are not interchangeable displays.

At each time \(t\), choose a central summary, such as the predictive median, and quantiles such as the 10th, 25th, 75th, and 90th percentiles. The region between the 25th and 75th percentiles is a narrower band; the region between the 10th and 90th percentiles is a wider band. Label the quantiles and the central summary directly or in a clear legend. If a mean is used as the central curve, say so; the mean need not fall halfway between the outer quantiles in a skewed predictive distribution.

$$ \widehat{Q}_p(t)=\text{the empirical }p\text{th quantile of } \{Y^{(1)}(t),\ldots,Y^{(M)}(t)\}. $$

For a clinical threshold \(c\), the same draws give a pointwise probability estimate. For example, if lower biomarker values are desirable, the estimated probability of meeting the target at time \(t\) is the fraction of predictions at or below \(c\). If higher values are desirable, the inequality reverses. State the direction and the time point; a line crossing alone does not show what fraction of simulated outcomes meet the target.

$$ \widehat{P}\{Y(t)\leq c\} = \frac{1}{M}\sum_{m=1}^{M} I\{Y^{(m)}(t)\leq c\}, $$

where \(I\{\cdot\}\) equals 1 when its condition is true and 0 otherwise. This fraction estimates a probability under the specified predictive distribution. Its interpretation depends on how that distribution was constructed and on the model assumptions behind it.

Worked Example: Plotting a Biomarker Fan and a Target

Hypothetical data. A model produces 10 simulated biomarker predictions at three visits. Values are in mg/L and are sorted from smallest to largest at each visit. For this small illustration, use the nearest-rank empirical quantile: the \(p\)th quantile is the observation at rank \(\lceil 10p\rceil\). Thus the 10th, 50th, and 90th percentiles are the 1st, 5th, and 9th sorted values, respectively.

At week 0 the sorted values are 96, 97, 98, 99, 100, 101, 102, 103, 104, and 105 mg/L. The 10th–90th percentile band is 96–104 mg/L, and the median is the 5th value, 100 mg/L.

At week 4 the sorted values are 72, 76, 80, 83, 86, 89, 92, 96, 101, and 108 mg/L. The 10th–90th band is 72–101 mg/L and the median is 86 mg/L. At week 8 the sorted values are 54, 60, 65, 70, 75, 80, 87, 95, 106, and 120 mg/L. The band is 54–106 mg/L and the median is 75 mg/L.

Suppose the target is a biomarker value at or below 80 mg/L. At week 8, six of the 10 simulated values meet the target, so the estimated pointwise probability is \(6/10=0.60\), or 60%. The median is below the threshold, but that does not mean that 90% of predictions meet the target; the simulated fraction is 60%. A chart would show the median curve, the 10th–90th band, and a horizontal line at 80 mg/L. The increasing width of the band from week 0 to week 8 indicates greater dispersion in these predictions at later visits.

What the Bands Do—and Do Not—Guarantee

A pointwise central 80% prediction interval at time \(t\) is intended to cover 80% of outcomes from the predictive distribution at that particular time, subject to model adequacy and accurate estimation of its quantiles. It does not imply that 80% of entire simulated trajectories stay inside the band at every time. A trajectory can leave a pointwise band at one or more visits even when it lies within the band at most visits.

The distinction follows directly from the event being summarized. The pointwise event is \(Y(t)\) falling between two quantiles at a specified \(t\). The trajectory event is that this condition holds simultaneously at every time in a set of visits. Simultaneous coverage concerns the joint distribution across times, not just separate distributions at each time.

$$ P\{L(t)\leq Y(t)\leq U(t)\}\approx 0.80 \quad\text{at a specified }t $$

This statement does not establish that \(P\{L(t)\leq Y(t)\leq U(t)\text{ for every }t\}\) is also approximately 0.80. The latter probability depends on how predictions at different times co-vary. Simulated trajectories preserve that dependence when each draw represents a coherent path through time. Computing pointwise quantiles from those draws uses the marginal distribution at each time; it does not turn the resulting bands into a simultaneous interval.

Justification: If \(F_t\) is the predictive cumulative distribution of \(Y(t)\), its \(p\)th quantile \(Q_p(t)\) satisfies \(F_t(Q_p(t))=p\) when the distribution is continuous. Therefore, the interval from \(Q_{0.10}(t)\) to \(Q_{0.90}(t)\) contains 80% of the predictive distribution at that time. This argument applies separately at each \(t\); it makes no claim about joint coverage across times.

Worked Example: Pointwise Target Achievement Versus Crossing Over Time

Hypothetical data. Eight simulated biomarker trajectories, in mg/L, are shown at weeks 4, 8, and 12. The target is at or below 80 mg/L.

TrajectoryWeek 4Week 8Week 12
A957870
B908275
C887983
D1009285
E858179
F937782
G918676
H898481

At week 12, trajectories A, B, E, and G meet the target. The pointwise estimate is \(4/8=0.50\), or 50%. In contrast, six trajectories (A, B, C, E, F, and G) meet the target at least once across the three visits, giving an estimated probability of ever reaching the target of \(6/8=0.75\). These are different questions and have different answers. A fan chart with a threshold line can show the time pattern, but the probability of ever crossing requires checking each simulated path across visits.

Choosing and Checking a Fan Chart

Before interpreting the display, verify that its construction matches its intended use. The following checks are especially important in clinical prediction:

  • Define the prediction target. State whether the curves describe individual outcomes, a population summary, or another quantity. Identify which sources of uncertainty the simulated draws include.
  • Use coherent time paths. Each draw should correspond to the same simulated realization across visits. Independently generating values at each time can erase temporal dependence and cannot support trajectory-level calculations such as ever crossing a threshold.
  • Label summaries and units. Specify whether the centre is a mean or median, identify the quantile levels, name the biomarker or event measure, and show its units. State whether a clinical threshold is an upper or lower target.
  • Check the time grid and data support. Make clear where predictions are evaluated. A smooth line between sparse time points can suggest precision or behavior the model did not establish.
  • Inspect for implausible shapes. Unexpected jumps, abrupt widening, or a band that violates known outcome constraints may point to a modeling, simulation, or plotting problem. For example, a cumulative event probability should not decrease over time.
  • Assess Monte Carlo stability. Quantiles and threshold fractions are estimated from finite simulations. If they change materially when the simulation size increases, the displayed summaries need more precise simulation or a clear uncertainty qualification.

For a cumulative event probability, use the same event definition and time origin across simulations. If every simulated cumulative-incidence curve is nondecreasing, its pointwise quantiles will also be nondecreasing: at a later time, each simulated value is at least as large as its own earlier value, so the ordered values cannot decrease. A decreasing quantile curve in this setting is a warning to check whether the simulated quantity is truly cumulative, whether draws were aligned across time, and whether calculations or plotting introduced an error.

Worked Example: A Fan Chart for Cumulative Event Risk

Hypothetical data. A model generates 10 coherent predictions of cumulative event risk at weeks 6 and 12. At week 6, the sorted risks are 0.04, 0.05, 0.06, 0.07, 0.08, 0.10, 0.12, 0.14, 0.16, and 0.18. At week 12, they are 0.10, 0.12, 0.15, 0.18, 0.20, 0.24, 0.28, 0.32, 0.38, and 0.45. Use the same nearest-rank rule as in the earlier example.

At week 6, the 10th–90th percentile band is 0.04–0.16 and the median is 0.08. At week 12, the band is 0.10–0.38 and the median is 0.20. These risks are proportions, so the week-12 median corresponds to 20%. If the decision threshold is a cumulative risk of 0.25, four of the 10 week-12 predictions exceed it (0.28, 0.32, 0.38, and 0.45); the estimated pointwise probability of exceeding the threshold is \(4/10=0.40\), or 40%.

A chart should label the vertical axis as cumulative event risk, display the threshold at 0.25, and state that the fan represents simulated predictive quantiles. Since this is a small illustrative sample of simulations, the estimated quantiles and 40% fraction are coarse; a practical analysis would use enough simulations to obtain stable summaries. The band describes variation in the predicted risk, not a guarantee that the observed risk in a future study will lie within it.

Alternatives, Limitations, and Common Mistakes

A fan chart is compact when the main question is how central predictions and selected uncertainty ranges evolve over time. A collection of trajectory lines can reveal irregular paths and whether curves cross a threshold, but many lines may obscure their distribution. A table can report exact quantiles at selected visits, but can make time trends harder to see. Density or cumulative distribution displays answer distributional questions at selected times; they do not replace a longitudinal view when timing and path shape matter.

No single fan chart displays every feature of the predictive distribution. Quantile bands can hide skewness, multiple modes, or a small but decision-relevant tail. A central curve can conceal distinct trajectory patterns. A chart also cannot compensate for misspecified assumptions, unrepresented uncertainty, or predictions made far beyond the data that informed the model. Where those issues matter, supplement the display with appropriate numerical summaries or other views of the predictive distribution.

  • Mistake: “The 80% band contains 80% of complete patient trajectories throughout follow-up.” Correction: A pointwise 80% band targets coverage at each specified time separately; simultaneous coverage of whole trajectories is a different quantity.
  • Mistake: “The median is below the target, so nearly all predictions meet it.” Correction: The median marks the 50th percentile. Calculate the simulated fraction meeting the threshold to report a pointwise probability.
  • Mistake: “A line crossing proves that patients reach the target.” Correction: A central curve crossing describes a central summary. The fraction of simulated paths crossing, and when they cross, must be calculated from the trajectories.
Key takeaway: A well-defined fan chart pairs a clearly specified prediction target with a central summary, labelled pointwise quantiles, and a contextualized clinical threshold. Interpret its bands at the times shown, and use coherent simulated trajectories for questions about events over the full course of follow-up.

Check Your Understanding

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

  1. A pointwise 90% prediction band is drawn at each visit. Does this establish that 90% of entire trajectories remain inside the bands at all visits? Explain.
  2. At a specified visit, 240 of 400 simulated predictions are at or below a biomarker target. What is the estimated pointwise probability of meeting the target?
  3. A median prediction is below a clinical threshold, but the 10th–90th percentile band straddles it. What can and cannot be concluded from this display alone?
  4. Why should a prediction for a new patient include a different uncertainty target from a prediction of the population mean?
  5. In a fan chart of cumulative event risk, the 75th percentile decreases between two visits. Name a feature of the simulation or display that should be checked.

Solutions. (1) No. The 90% coverage statement is pointwise; simultaneous coverage across visits depends on the joint distribution of the trajectories. (2) \(240/400=0.60\), so the estimated probability is 60%. (3) The central prediction is below the threshold, but the band shows that substantial predictive variation spans it. The proportion meeting the target must be calculated from the predictive draws. (4) A new-patient prediction concerns individual outcomes and may include between-patient variability; a population-mean prediction targets a group summary and has a different predictive distribution. (5) Check that the outcome is genuinely cumulative, that the same simulated trajectories are aligned across visits, and that quantile calculation and plotting are correct.