Tutorials › Competing Risks and Multi-State Models › Checking Whether History Adds Predictive Information

Semi-Markov and Non-Markov Models · Tutorial 334 of 699

Checking Whether History Adds Predictive Information

Compare transition risks among individuals with the same current state and duration but different recorded histories, and assess whether any added predictive information is reliable and useful.

Advanced 13 min read

What You'll Learn

  • Define a history-specific transition-risk contrast conditional on current state and duration.
  • Standardize matched-stratum risks to a common distribution of state durations.
  • Distinguish finite-horizon transition probabilities from cause-specific transition rates.
  • Interpret a rate-ratio interval and a nested-model likelihood-ratio test.
  • Evaluate whether history improves predictions in independent validation data.
  • Diagnose lack of overlap, sparse events, censoring, and overinterpretation.

Why Compare Histories at the Same State and Duration?

A person’s current state and time already spent in it can both predict what happens next. A history variable may appear predictive simply because the history groups differ in either of these features. To ask whether recorded history adds information, compare individuals who are alike in current state and duration but differ in history. The question is predictive: after accounting for state and duration, do the observed histories distinguish future transition risks?

This comparison does not by itself identify a causal effect of history. Recorded history may stand for unmeasured health, treatment, or selection factors. Nor does a difference in a cause-specific transition rate necessarily imply the same difference in the probability of that transition by a fixed time: competing transitions also affect that probability.

Definition: Let \(X(t-)=j\) denote being in state \(j\) immediately before time \(t\), let \(D(t)\) be the time spent in the current visit to state \(j\), and let \(H(t-)\) denote recorded history up to, but not including, \(t\). A history contrast compares the conditional risk of a specified transition \(j\to k\) for different values of \(H(t-)\), at the same current state, duration, and other conditioning variables. History adds predictive information if it improves the conditional description or prediction of subsequent transitions beyond those variables.

For a continuous-time process, the transition intensity \(\lambda_{jk}(t\mid X(t-)=j,D(t)=d,H(t-)=h,Z=z)\) is the instantaneous rate of transition from \(j\) to \(k\), conditional on being in \(j\) at time \(t\), the duration \(d\), history \(h\), and other covariates \(z\). An intensity contrast is local in time. A finite-horizon risk, by contrast, is the probability of making the specified transition within a stated time horizon before another transition removes the individual from the origin state.

A direct null hypothesis for no history contribution is equality of the conditional transition distributions across histories, at each supported combination of current state, duration, and covariates. In an intensity model, a corresponding null is equality of the transition intensities for all relevant destinations and times. The comparison is meaningful only where both histories are represented at comparable state-duration values; no method can reliably compare groups with no common support.

From Intensities to Finite-Horizon Risks

Suppose an individual is in state \(j\) at a landmark time \(t_0\), and consider the first exit from \(j\). Write \(\lambda_{j\ell}(u\mid h)\) for the intensity of exit to destination \(\ell\), at \(u\) time units after the landmark, conditional on the matched state, duration, covariates, and recorded history \(h\). If the conditional intensities are well-defined and continuous, the probability of remaining in \(j\) through time \(u\) is

$$ S_j(u\mid h) = \exp\left\{-\int_0^u \sum_{\ell\ne j}\lambda_{j\ell}(v\mid h)\,dv\right\}. $$

The cumulative incidence of the particular transition \(j\to k\) by horizon \(\tau\) is therefore

$$ F_{jk}(\tau\mid h) = \int_0^\tau S_j(u\mid h)\lambda_{jk}(u\mid h)\,du. $$

The first expression includes all possible exits from \(j\); the second multiplies the chance of still being in \(j\) by the instantaneous rate of the target transition. These formulas justify an important caution: even if history changes only an intensity to a competing destination, it can change the target transition’s cumulative incidence by changing how many people remain at risk for that target transition.

Worked Example: Standardizing Risks Across Duration Strata

Consider a hypothetical cohort observed for 30 days after a landmark. Everyone is in the same current state. The recorded histories are \(H=1\) and \(H=0\), and individuals are grouped into two duration strata. Follow-up is complete, so each person has one of three outcomes by day 30: the target transition, a competing transition, or no exit. The table gives counts in each group.

Duration stratumHistoryTarget transitionCompeting transitionNo exitTotal
2–4 daysH=184820
2–4 daysH=0641020
5–7 daysH=1351220
5–7 daysH=0131620

Within the 2–4 day stratum, the target-transition risks are \(8/20=0.40\) for \(H=1\) and \(6/20=0.30\) for \(H=0\). Within the 5–7 day stratum, they are \(3/20=0.15\) and \(1/20=0.05\), respectively. Standardize both histories to a common population with equal weight on the two duration strata:

$$ \widehat F_{H=1}=\tfrac12(0.40)+\tfrac12(0.15)=0.275, \qquad \widehat F_{H=0}=\tfrac12(0.30)+\tfrac12(0.05)=0.175. $$

The standardized risk difference is \(0.275-0.175=0.100\), or 10 percentage points over 30 days; the standardized risk ratio is \(0.275/0.175=1.571\). Under this chosen equal-stratum weighting, the observed target-transition risk is higher for \(H=1\). The arithmetic is valid because both history groups have observations in each stratum and the outcome status is known for everyone through the horizon. The result is an association in this hypothetical data, not evidence that changing history would cause a change in risk. Different standardization weights would answer a different population-level question.

Rates, Uncertainty, and Model Comparisons

A useful analysis first defines the target: a horizon-specific transition probability, an instantaneous intensity, or a predictive score. If the target is an intensity, a simple matched-stratum comparison can use person-time and event counts when a constant rate is reasonable over the interval. For two independent history groups with event counts \(d_1,d_0\) and person-times \(T_1,T_0\), the estimated rates are \(d_1/T_1\) and \(d_0/T_0\). Under independent Poisson event counts conditional on exposure, the estimated log rate ratio has standard error \(\sqrt{1/d_1+1/d_0}\). This calculation assumes event rates are constant within the compared interval and that exposure time and event counting are correctly recorded; it is not a general estimator of a cumulative incidence.

Worked Example: A Matched-Stratum Rate Ratio and Interval

In a hypothetical matched state-duration stratum, the \(H=1\) group experiences 12 target transitions over 600 person-years, while the \(H=0\) group experiences 8 over 800 person-years. Suppose the groups are independent, rates are constant within this stratum, and event counts follow Poisson distributions conditional on the person-time.

The estimated rates are \(12/600=0.0200\) transitions per person-year and \(8/800=0.0100\) transitions per person-year. Thus the estimated rate ratio is

$$ \widehat{RR} = \frac{12/600}{8/800} = 2.00. $$

The estimated standard error of the log rate ratio is

$$ SE\{\log(\widehat{RR})\} = \sqrt{\frac{1}{12}+\frac{1}{8}} = \sqrt{0.2083} = 0.4564. $$

A large-sample 95% Wald interval on the log scale is \(\log(2.00)\pm1.96(0.4564)\). Its endpoints are \(-0.2014\) and \(1.5877\), so exponentiating gives

$$ \exp\{\log(2.00)\pm1.96(0.4564)\} = \exp(-0.2014,\ 1.5877) \approx (0.818,\ 4.89). $$

The estimated rate in the \(H=1\) group is twice that in the \(H=0\) group, but the 95% interval is wide and includes 1. Under the model assumptions, the data do not establish a difference at the conventional two-sided 5% level. The interval also shows substantial uncertainty: rate ratios from below 1 to nearly 5 are compatible with this approximation. It is an interval for a rate ratio, not for a 30-day transition probability.

For a fitted history-dependent model and a nested model without history terms, a likelihood-ratio comparison can test whether the added parameters improve fit. The statistic is twice the log-likelihood difference, \(2(\ell_{\text{full}}-\ell_{\text{reduced}})\). Under the null, regular likelihood conditions, independent sampling units, and a correctly specified likelihood, its large-sample reference distribution is chi-squared with degrees of freedom equal to the number of added parameters. Both models must use the same observations and outcome likelihood. Sparse events, parameters on a boundary, or a highly flexible history specification can make that approximation unreliable. A small p-value indicates evidence against the specified reduced model; it does not show that the history terms improve prediction in new individuals or that the history has a causal effect.

Worked Example: Checking Predictive Improvement on Held-Out Data

Suppose two models are fitted using one hypothetical data set, then evaluated on four separate individuals from a validation set. Each prediction gives probabilities of the target transition, a competing transition, and no exit by the same fixed horizon. For a fully observed outcome category, the multicategory Brier score is the sum of squared differences between the three predicted probabilities and the three outcome indicators. Lower average scores indicate better probabilistic predictions on this validation set.

The reduced model, which omits history, predicts \((0.30,0.20,0.50)\) for every individual. The observed outcomes in order are target, competing, no exit, target. Its scores are \(0.78, 0.98, 0.38,\) and \(0.78\). For example, for the first target outcome the score is \((1-0.30)^2+(0-0.20)^2+(0-0.50)^2=0.78\). The mean is \((0.78+0.98+0.38+0.78)/4=0.730\).

The history model’s predictions are \((0.55,0.15,0.30)\), \((0.20,0.45,0.35)\), \((0.25,0.15,0.60)\), and \((0.50,0.25,0.25)\), respectively. Applying the same formula gives scores \(0.315, 0.465, 0.245,\) and \(0.375\); for example, the third score is \((0-0.25)^2+(0-0.15)^2+(1-0.60)^2=0.245\). The history model’s mean is \(1.400/4=0.350\), lower than \(0.730\) for the reduced model. This small example favors the history model on the chosen score, but four observations cannot establish stable improvement. Credible assessment requires validation data independent of model fitting, a prespecified horizon and score, and a validation sample relevant to the intended prediction population.

A Practical Comparison and Diagnostics

1
Define the prediction target.
Specify the current state, transition of interest, horizon or rate scale, and the recorded history contrast before looking at results.
2
Check comparability.
Within each relevant state-duration stratum, inspect whether both history groups are present and whether covariates and follow-up are measured comparably.
3
Estimate a conditional contrast.
Use stratum-specific risks or intensities, then combine them using a stated common weighting distribution. Keep transition probabilities distinct from rates.
4
Assess uncertainty and prediction.
Report an interval or suitable model comparison, then check whether adding history improves predictions in held-out data at the intended horizon.

These approaches answer related but different questions. A standardized risk contrast describes average differences over a specified horizon in a population defined by the chosen weights. A rate ratio describes relative instantaneous event rates under its rate assumptions. A likelihood-ratio test assesses model fit under a nested likelihood, while a held-out score evaluates predictive performance. No single result replaces the others: fit improvement can coexist with negligible predictive gain, and a useful predictor need not have a causal interpretation.

Diagnostics matter because a numerical contrast can be misleading even when the arithmetic is correct. Check for few or zero events in a history-by-duration stratum, unstable estimates, and poor overlap in the duration distributions. Inspect whether follow-up or censoring differs by history; incomplete outcome ascertainment can distort raw horizon risks, and any censoring adjustment requires additional assumptions. Check model fit over duration and time, and assess calibration as well as average prediction score. If the model predicts well only in the fitting data, that is not convincing evidence that history adds useful predictive information.

Common Pitfall and Limits

A common mistake is to compare crude risks in history groups and attribute the difference to history, despite unequal duration in the current state. For instance, if \(H=1\) occurs mostly among people with long state duration and transition risk varies with duration, a crude contrast combines history and duration differences. The correction is to compare within duration strata or standardize both history groups to the same duration distribution, and to report which distribution defines the target contrast. Exact matching is not always feasible; broad strata can leave residual duration differences, while very narrow strata can produce unstable estimates.

Even a well-adjusted predictive contrast is conditional on recorded variables and observed support. It may not transport to settings with different history patterns, transition mechanisms, or follow-up. A model can also add statistically detectable history terms without a practically meaningful improvement in calibrated risk prediction. Report uncertainty, the size of predictive improvement, and the population and horizon to which the result applies.

Key takeaway: History adds predictive information only when it distinguishes subsequent transition distributions among individuals comparable in current state and duration, and when the improvement is supported by adequate overlap and reliable validation. A conditional association is not a causal effect.

Check Your Understanding

Answer each question, then compare with the solutions below.

  1. In a matched state-duration stratum, 9 of 30 individuals with \(H=1\) experience the target transition by day 20; 6 of 30 with \(H=0\) do. Find the risk difference and risk ratio.
  2. Why can a history that affects only a competing transition still change the cumulative incidence of the target transition?
  3. A fitted history model has a lower training-set Brier score but a higher held-out Brier score than the reduced model. What conclusion is appropriate?
  4. What is a key problem with comparing two histories when one is never observed at long durations in the current state?

Solutions. (1) The risks are \(9/30=0.30\) and \(6/30=0.20\). The risk difference is \(0.30-0.20=0.10\), or 10 percentage points, and the risk ratio is \(0.30/0.20=1.50\). (2) A competing transition changes the probability of remaining in the origin state, and therefore changes the time available for the target transition; the cumulative incidence integrates the target intensity multiplied by that state-survival probability. (3) There is no evidence of improved out-of-sample prediction in that validation result; the lower training score may reflect overfitting. (4) There is no common support at those durations, so the history contrast cannot be estimated there from observed comparisons without extrapolation or additional assumptions.

Clinical Biostats