Tutorials › Competing Risks and Multi-State Models › Bootstrap Intervals for Dynamic State-Occupation Predictions

Landmarking and Dynamic Prediction · Tutorial 495 of 699

Bootstrap Intervals for Dynamic State-Occupation Predictions

Learn to build and interpret bootstrap confidence intervals for state-occupation probabilities at chosen landmarks and horizons, while accounting for the sampling design and the full prediction procedure.

Advanced 11 min read

What You'll Learn

  • Define the prediction target at a landmark and a fixed future horizon.
  • Resample independent subjects or clusters while preserving their complete observed histories.
  • Refit the prediction procedure in every bootstrap replicate.
  • Construct and interpret percentile and normal-approximation intervals.
  • Distinguish marginal intervals for individual states from joint uncertainty across states.
  • Diagnose unstable bootstrap distributions and explain when bootstrap inference may be unreliable.

Why Bootstrap a Landmark Prediction?

A predicted state-occupation probability is an estimate, not a known quantity. It varies because the observed sample varies, and its uncertainty can involve several fitted components: transition-specific models, estimated transition probabilities, and the distribution of landmark covariates used to form a population prediction. The earlier material on parameter uncertainty in landmark state predictions motivates quantifying this variability. A bootstrap does so by repeatedly constructing new samples from the observed data and recalculating the prediction.

Fix a landmark time \(s\), a future horizon \(u\), a state \(k\), and a target defined by the prediction procedure. Write the estimated probability of occupying state \(k\) at time \(s+u\), conditional on the specified landmark information, as \(\hat p_k(u\mid s)\). The target and the horizon are held fixed across replicates. The interval considered here is generally pointwise: it concerns one state at one selected horizon, rather than simultaneous coverage of an entire trajectory or every state and horizon.

Definition: A nonparametric bootstrap replicate is formed by sampling the independent observational units from the observed data with replacement, then repeating the specified estimation procedure on that resampled data. For replicate \(b\), denote the resulting state-occupation prediction by \(\hat p_k^{*(b)}(u\mid s)\). A bootstrap confidence interval summarizes the sampling variation of these replicate predictions.

What Must Be Resampled and Refit?

The resampling unit must match the unit that is independent under the study design. For independent subjects, resample subjects. Each resampled subject must bring the complete record needed for prediction: covariates, state history, event times, event types, and censoring information. If subjects are clustered and observations within a cluster are dependent, resample independent clusters and retain all records within each selected cluster. Resampling individual rows of a repeated-measures or multi-state record would break the dependence structure and is generally inappropriate.

In each replicate, rerun every estimation step whose uncertainty is part of the intended inference. That commonly means refitting transition-specific models or recalculating transition estimates, then recomputing the state-occupation prediction. If the target is a population-average prediction over the observed landmark cohort, reconstruct landmark eligibility and repeat the averaging according to the target definition. If the target is instead a prediction for a fixed covariate profile, keep that profile fixed while refitting the model. These choices answer different questions and should be specified before bootstrapping.

The landmark time and future horizon are typically fixed design choices for this interval. If the scientific target includes an estimated or data-selected landmark or horizon, that selection may also contribute uncertainty and needs a procedure designed for that target. Do not silently treat a data-dependent choice as fixed. The ordinary bootstrap also assumes that resampling the observed independent units is a reasonable approximation to the sampling process; it does not repair model misspecification or incorrect handling of censoring.

1
Specify the target.
State the landmark, state, future horizon, and whether the prediction is for fixed covariates or an estimated target population.
2
Resample independent units.
Sample subjects or clusters with replacement, retaining complete histories and design features needed by the analysis.
3
Repeat the analysis.
Reconstruct the relevant landmark data, refit estimated components, and calculate the target state-occupation probability.
4
Summarize the replicates.
Use the bootstrap distribution to construct an interval and inspect its shape, boundaries, and failures.

Intervals and Their Interpretation

With \(B\) successful replicates, sort the predictions as \(\hat p_{k,(1)}^*,\ldots,\hat p_{k,(B)}^*\). The percentile interval uses the empirical quantiles at the desired tail probabilities. For a nominal 95% interval, these are the 2.5th and 97.5th percentiles. This construction stays within \([0,1]\) when every replicate is a valid probability, although it is not guaranteed to have accurate coverage in small or irregular samples.

$$ \text{Percentile 95\% CI} = \left[ Q_{0.025}\{\hat p_k^*(u\mid s)\}, Q_{0.975}\{\hat p_k^*(u\mid s)\} \right]. $$

A normal-approximation interval instead uses the bootstrap standard deviation \(SE_{\text{boot}}\) as an estimate of the prediction's standard error:

$$ \hat p_k(u\mid s)\ \pm\ 1.96\,SE_{\text{boot}}, \qquad SE_{\text{boot}} = \sqrt{\frac{1}{B-1}\sum_{b=1}^{B} \left(\hat p_k^{*(b)}-\bar p_k^*\right)^2}, \quad \bar p_k^*=\frac{1}{B}\sum_{b=1}^{B}\hat p_k^{*(b)}. $$

The normal interval can extend below zero or above one, especially near a boundary or when the bootstrap distribution is skewed. The percentile interval respects the probability range but can also perform poorly when the estimator is biased, highly discrete, or irregular. Neither interval is automatically reliable merely because many replicates were run. The confidence level describes the long-run coverage of the procedure under its assumptions; it is not a probability statement about the fixed parameter after observing this particular interval.

Worked Example: A Percentile Interval at a Fixed Horizon

Suppose a hypothetical cohort is used to predict occupation of the “alive with disease” state two years after a fixed landmark. The fitted prediction is \(0.38\). A subject-level bootstrap with \(B=2{,}000\) replicates refits the full prediction procedure each time. The empirical 2.5th and 97.5th percentiles are \(0.29\) and \(0.48\).

The percentile interval is therefore \([0.29,0.48]\). The endpoints are probabilities, so the interval corresponds to 29% to 48% occupation probability at the two-year horizon. Under the sampling and modeling assumptions, the procedure is designed to produce intervals covering the target probability in about 95% of repeated samples. It does not mean that there is a 95% probability the fixed target probability lies in this already computed interval.

The estimate and interval are coherent with the defined target: the estimate lies between the endpoints, and both endpoints are valid probabilities. The result is pointwise for this state and this horizon; it does not provide 95% simultaneous coverage for all states or all times.

Why Full Refitting Matters

A bootstrap should reproduce the variability of the estimator being reported. Holding a fitted transition model, a landmark covariate distribution, or another estimated component fixed omits that component’s estimation variability. It can therefore understate total uncertainty. However, the change in variability from refitting is not guaranteed to be upward: refitting can alter covariance among estimated components, and covariance can either increase or reduce the variability of their combined prediction.

The variance identity makes the point explicit. If a prediction depends on the difference of two estimates, \(\hat a-\hat b\), then \(\operatorname{Var}(\hat a-\hat b)=\operatorname{Var}(\hat a)+\operatorname{Var}(\hat b)-2\operatorname{Cov}(\hat a,\hat b)\). A strong positive covariance can make the full-refit difference much less variable than either estimate alone.

Worked Example: Covariance Can Reduce Full-Refit Variability

Consider a hypothetical prediction component \(\hat\theta=\hat a-\hat b\). Across bootstrap refits, suppose both \(\hat a\) and \(\hat b\) have standard deviation \(0.10\), and their correlation is \(0.90\). Their covariance is \(\operatorname{Cov}(\hat a,\hat b)=0.90(0.10)(0.10)=0.0090\).

Thus the variance of the full-refit difference is \[ \operatorname{Var}(\hat\theta) =0.10^2+0.10^2-2(0.0090) =0.0020, \] so its standard deviation is \(\sqrt{0.0020}=0.0447\). If \(\hat b\) were held fixed, the resulting variation from \(\hat a\) alone would have standard deviation \(0.10\), larger than \(0.0447\). This example shows why it is incorrect to claim that refitting must increase bootstrap variability. Holding components fixed omits their estimation variation, but covariance changes mean the direction of the net effect is not fixed.

Worked Example: A Normal-Approximation Interval

For another hypothetical two-year landmark prediction, suppose the point estimate for occupation of a specified state is \(0.36\). The standard deviation of \(B=1{,}500\) full-refit bootstrap predictions is \(SE_{\text{boot}}=0.045\). The normal-approximation 95% interval is \[ 0.36\pm1.96(0.045) =0.36\pm0.0882 =[0.2718,0.4482]. \]

Rounded to three significant figures, the interval is \([0.272,0.448]\), or 27.2% to 44.8%. It is centered on the estimate because this construction is symmetric. Before reporting it, inspect the replicate distribution: marked skewness, a pile-up at zero or one, or substantial probability outside the allowable range would make this interval questionable. In this example the endpoints happen to be in \([0,1]\); that fact alone does not establish normality or good coverage.

Multiple States, Diagnostics, and Alternatives

State-occupation probabilities at a common horizon form a vector whose entries sum to one. Bootstrap the vector from the same replicate, rather than resampling or analyzing each state independently. Its replicate covariance captures dependence between state probabilities. Marginal percentile intervals are still computed state by state, and their endpoints need not sum to one; they are not a confidence region for the entire probability vector.

Worked Example: Marginal Intervals Are Not a Joint State Region

At one hypothetical horizon, predictions for three exhaustive states are \(0.50\), \(0.30\), and \(0.20\), which sum to one. Suppose the respective marginal bootstrap 95% intervals are \([0.42,0.58]\), \([0.23,0.38]\), and \([0.14,0.27]\). The point estimates are coherent, but the lower endpoints sum to \(0.42+0.23+0.14=0.79\), and the upper endpoints sum to \(0.58+0.38+0.27=1.23\).

This does not contradict the fact that each replicate’s state probabilities sum to one. The intervals summarize marginal uncertainty separately and are not meant to define one possible probability vector by choosing arbitrary endpoints. If simultaneous inference across states is required, use a joint procedure that accounts for their dependence rather than interpreting these marginal intervals as simultaneous.

Useful diagnostics include the fraction of replicates in which model fitting or prediction fails, the number of distinct resampled subjects, the distribution’s skewness and boundary mass, and how much the interval changes when \(B\) is increased. A large failure rate or extreme instability can indicate sparse landmark support, rare transitions, separation, or model-fitting problems. Do not simply discard failed replicates without investigating: the remaining replicates may no longer represent the intended sampling distribution. Report the resampling unit, number of attempted and successful replicates, interval method, and any failures or modifications.

The bootstrap complements, rather than replaces, other uncertainty methods. A delta-method interval uses estimated derivatives and a covariance estimate and may be efficient when the estimator is sufficiently regular and its sampling distribution is approximately normal. A parametric bootstrap simulates from a fitted model and refits it; it can be useful when the model is well specified, but its results depend more directly on that model’s distributional assumptions. The subject-level nonparametric bootstrap makes fewer parametric assumptions, but can be unstable with small samples, sparse states, or boundary probabilities. All these methods condition on the chosen model structure unless model-selection uncertainty is explicitly included.

Common Mistake and Practical Limits

  • Resampling records instead of independent units. This can destroy within-person event-history dependence. Resample the complete subject record, or the independent cluster when clustering is present.
  • Holding fitted components fixed without changing the target. This omits their estimation variability and can understate total uncertainty; covariance among refitted components means the direction of the net change is not guaranteed.
  • Calling separate state intervals a joint 95% region. Marginal 95% intervals do not generally provide 95% simultaneous coverage across states or horizons.
  • Treating a large \(B\) as a cure for weak data. More replicates reduce Monte Carlo error in estimated quantiles, but cannot create information absent from a small or sparse landmark sample.

Bootstrap intervals quantify sampling uncertainty for a specified estimator and target. They do not by themselves assess calibration, establish that the prediction model is correct, or account for unmeasured sources of uncertainty. When support is poor or replicates frequently fail, the limitation should be reported rather than concealed by a seemingly precise interval.

Key takeaway: For a bootstrap interval on a landmark state-occupation prediction, resample the correct independent units, preserve complete histories, and refit the components that define the estimator. Interpret the resulting interval as uncertainty for one clearly specified state, landmark, horizon, and target—not as a guarantee of model validity or simultaneous coverage.

Check Your Understanding

Answer each question, then compare with the solutions.

  1. A subject has repeated state observations and event times. What should be resampled in an ordinary subject-level bootstrap?
  2. For an estimated probability \(0.41\), the bootstrap 2.5th and 97.5th percentiles are \(0.32\) and \(0.53\). State the pointwise interval and interpret it.
  3. Why can full refitting reduce, rather than increase, the variability of a prediction?
  4. Three exhaustive state probabilities have marginal interval endpoints whose upper limits sum to \(1.18\). Does that mean the bootstrap replicates violated the sum-to-one condition?

Solutions. (1) Resample subjects and retain each selected subject’s complete record, including all relevant covariates, histories, event information, and censoring information. (2) The pointwise 95% interval is \([0.32,0.53]\), or 32% to 53% occupation probability at the specified state and horizon; the procedure has nominal 95% repeated-sampling coverage under its assumptions. (3) Refitting changes covariance among estimated components. For a difference, the covariance is subtracted twice in the variance formula, so strong positive covariance can reduce variability. (4) No. Marginal upper endpoints come from separate quantiles and need not form a valid joint probability vector; each replicate’s vector can still sum to one.

Clinical Biostats