Tutorials › Competing Risks and Multi-State Models › Interpreting Conditional Risks In History-Dependent Models

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

Interpreting Conditional Risks In History-Dependent Models

Translate fitted history-dependent transition rules into conditional probabilities for a clearly specified state, sojourn time, prior history, and time horizon.

Advanced 12 min read

What You'll Learn

  • Define a conditional risk using the current state, sojourn time, prior history, and a prediction horizon.
  • Derive first-transition probabilities from transition-specific hazards with competing exits.
  • Calculate conditional risks for constant and piecewise-constant hazards.
  • Distinguish first-transition risks from risks for an entire multi-state path.
  • Recognize when a risk statement omits a necessary history or duration condition.
  • Check whether model assumptions and the prediction target match the clinical question.

What Does a Conditional Risk Statement Specify?

A fitted transition rule is not yet a useful risk statement. To interpret it, specify who is being conditioned on and what event is being predicted. In a history-dependent multi-state model, the prediction may depend not only on the person’s current state but also on time already spent in that state and on earlier events. Leaving out any of these conditions can change the meaning of the reported risk.

Let \(X(t)\) denote the state occupied at time \(t\), and let \(H(t)\) denote the observed event history up to time \(t\). If the person is currently in state \(i\), define \(U(t)\) as the time elapsed since entry into the current visit to state \(i\). For a possible transition from state \(i\) to state \(j\), the transition-specific hazard is the instantaneous rate of that transition, conditional on the current state and history:

$$ \lambda_{ij}(t \mid H(t)) = \lim_{\Delta t\downarrow 0} \frac{P\{X(t+\Delta t)=j \mid X(t)=i,H(t)\}}{\Delta t}. $$

The hazard has units of inverse time. It is not itself a probability: over a short interval of length \(\Delta t\), the conditional transition probability is approximately \(\lambda_{ij}(t\mid H(t))\Delta t\). A hazard rule may use sojourn time \(U(t)\), earlier transitions, cumulative exposure, or other recorded features of history.

Definition: A conditional risk is a probability of a specified event over a specified future horizon, conditional on a stated current state and relevant history at a prediction time. In history-dependent models, a complete statement commonly specifies the current state, sojourn time, relevant prior events, horizon, and event being counted.

The risk is a model-based probability for people with the stated conditions. It is not automatically an unconditional population risk, and it is not a causal effect of the prior history. A prior event can be predictive without being an intervention that could be assigned.

From Transition Hazards to First-Transition Risks

Suppose that at a landmark time a person is in state \(i\), with a specified history. Consider the first transition out of \(i\) during the next \(h\) time units. Assume transitions are jumps, simultaneous transitions have probability zero, and all possible exits from \(i\) are represented by the outgoing transition hazards. Conditional on the specified history, write \(\lambda_{ik}(v)\) for the hazard of transition from \(i\) to \(k\) at future time \(v\) after the landmark. This notation allows the hazards to vary over the horizon; the history features used to predict them must be specified by the fitted model.

The total rate of leaving \(i\) at future time \(v\) is the sum of its outgoing hazards, \(\lambda_{i+}(v)=\sum_{k\ne i}\lambda_{ik}(v)\). The probability of remaining in \(i\) without any transition through time \(v\), conditional on the landmark state and history, is

$$ S_i(v \mid H) = \exp\left\{-\int_0^v \lambda_{i+}(s)\,ds\right\}. $$

The probability of a first transition to a particular destination \(j\) by horizon \(h\) is the integral of the chance of still being in \(i\) just before \(v\) times the instantaneous rate of transition to \(j\):

$$ P(\text{first transition is }i\to j\text{ by }h\mid X(0)=i,H) = \int_0^h S_i(v\mid H)\lambda_{ij}(v)\,dv. $$

This is a cumulative incidence for the first exit from the current state: other outgoing transitions compete with \(i\to j\), because any such exit ends the opportunity for \(i\to j\) to be the first transition in that visit. The expression assumes the hazards correctly describe the conditional process over the horizon. If a prediction rule updates its history predictors as future events occur, those updates must be incorporated in the prediction rather than silently held fixed.

Worked Calculations

Worked Example: Competing Exits Over Six Months

Suppose a hypothetical fitted rule gives a person currently in state A a constant hazard of \(0.08\) per month for A\(\to\)B and \(0.02\) per month for A\(\to\)C, conditional on the specified prior history. The person has just reached the prediction landmark, and the question is the probability that the first exit from A is to B within six months. Assume these hazards remain constant over those six months and there are no other exits from A.

The total exit hazard is \(0.08+0.02=0.10\) per month. Thus the first-exit risk to B is

$$ \begin{aligned} P(\text{first exit is A}\to\text{B by 6 months}\mid A,H) &=\int_0^6 e^{-0.10v}(0.08)\,dv\\ &=\frac{0.08}{0.10}\left(1-e^{-0.10(6)}\right)\\ &=0.8\left(1-e^{-0.60}\right)\\ &\approx 0.8(0.4511884)=0.3609507\approx 0.3610. \end{aligned} $$

So the modeled six-month probability of first exiting A to B is about 36.1%, conditional on being in A with the stated history at the landmark. The corresponding probability of first exiting to C is \(0.02/0.10(1-e^{-0.60})\approx0.09024\), and the probability of still being in A at six months is \(e^{-0.60}\approx0.5488\). These probabilities sum to approximately one. The \(0.08\)-per-month hazard alone would not give the B risk: the competing exit to C also reduces the chance of remaining available to transition to B.

Worked Example: A Prior Event and a Two-Month Relapse Risk

Consider a hypothetical remission-state model. The fitted transition rules depend on the prior history: among people in remission who have previously had an exacerbation, the first-month hazards are \(0.12\) per month for relapse and \(0.03\) per month for death. If the person remains in remission through month one, the second-month hazards are \(0.06\) per month for relapse and \(0.04\) per month for death. Find the probability of relapse as the first exit from remission within two months for someone in remission at the start of month one with that prior exacerbation history.

In month one, the total exit hazard is \(0.15\) per month. The probability of relapse during that month as the first exit is

$$ \frac{0.12}{0.15}(1-e^{-0.15}) =0.1114336\approx 0.1114. $$

To relapse in month two as the first exit, a person must first remain in remission through month one. That probability is \(e^{-0.15}\). In month two, the total exit hazard is \(0.10\) per month, so the conditional probability of relapse in that month is

$$ \frac{0.06}{0.10}(1-e^{-0.10}) =0.0570975. $$

The month-two contribution to the two-month risk is therefore

$$ e^{-0.15}\frac{0.06}{0.10}(1-e^{-0.10}) =0.0491443\approx 0.04914. $$

Using the unrounded contributions, the total is approximately \(0.1114336+0.0491443=0.1605779\), or 16.06%. The displayed rounded contributions \(0.1114\) and \(0.04914\) sum to \(0.16054\); that rounded sum is approximately \(0.1605\). The small difference reflects rounding before addition, not a different risk. This prediction is conditional on the specified prior exacerbation and starting in remission; it is not the risk for every person in remission.

Worked Example: Conditioning on Sojourn Time

Suppose a hypothetical model predicts first exits from state A for people with a particular recorded prior-event history. For someone currently in A who has already spent two months in this visit to A, the A\(\to\)B hazard is \(0.10\) per month from sojourn time two to three months, then \(0.04\) per month from sojourn time three to five months. The competing A\(\to\)C hazard is \(0.02\) per month throughout. Assume these piecewise-constant rules apply over the next three months. Find the probability of a first exit to B by the end of that horizon.

For the first month of the prediction, the total hazard is \(0.12\) per month. The probability of first exiting to B in this interval is

$$ \frac{0.10}{0.12}(1-e^{-0.12})\approx0.09423. $$

To reach the second interval without leaving A requires survival through the first interval, \(e^{-0.12}\approx0.8869\). In the next two months, the total hazard is \(0.04+0.02=0.06\) per month. Conditional on entering that interval still in A, the probability of first exiting to B before the end of the horizon is

$$ \frac{0.04}{0.06}(1-e^{-0.06(2)})\approx0.07539. $$

Weighting this second-interval risk by the chance of reaching that interval gives \(e^{-0.12}(0.07539)\approx0.06686\). Adding the two interval contributions gives a total first-exit risk of about \(0.09423+0.06686=0.1611\), or 16.11% over the next three months. The statement is conditional on already having spent two months in A and on the specified history. A prediction made for someone who has just entered A need not be the same.

Reading the Conditioning and Choosing a Risk Target

A useful interpretation reports the conditions in the same sentence as the probability. For example: “Among people in remission at the landmark who have a recorded prior exacerbation, the fitted model estimates a 16.06% probability of relapse as the first exit from remission within the next two months.” This identifies the current state, relevant history, event, and horizon. If sojourn time also matters, state it explicitly—for example, “after two months already spent in state A.”

The conditioning set should correspond to variables used by the model. If the rule uses the order of earlier events, naming only the current state is inadequate. If it uses cumulative exposure, specify the exposure value or the condition under which it is evaluated. If history changes during follow-up and affects subsequent hazards, the prediction procedure must say how that changing history is handled.

Do not confuse a first-transition risk with the probability of reaching a destination at any point along a longer path. The first-transition formula stops when the person leaves the current state. To obtain a probability involving later transitions—for example, moving from A to B and then to C—one must also account for the transition rules after entry into B. Likewise, a risk conditional on being in a state at a landmark is not the same as a cohort-wide probability that averages over different states and histories.

Assumptions, Diagnostics, and Alternatives

The calculations above require that the transition hazards apply to the stated prediction conditions and horizon, that all relevant outgoing transitions are included, and that the time scale and units are clear. Piecewise-constant calculations additionally assume the hazard is constant within each stated interval. A hazard fitted using a history feature cannot support a prediction for a history value or combination that the model does not define without an additional modeling choice.

Check predictions for internal coherence. First-exit probabilities for all destinations, plus the probability of remaining in the current state, should sum to one, up to numerical rounding. For nonnegative hazards, each risk must lie between zero and one, and increasing a competing exit hazard while holding the target hazard fixed should not increase the target’s first-exit probability. Compare predicted and observed transition frequencies over appropriate groups of current state, duration, and prior history when data permit. Sparse histories, unstable estimates, or systematic discrepancies across duration groups can make conditional predictions unreliable.

The main alternatives differ in what they condition on. A state-only Markov prediction uses the current state and omits duration and earlier history; it is simpler but can average over histories whose risks differ. A semi-Markov prediction can incorporate time in the current state but may still omit other prior events. A history-dependent model can distinguish those histories, at the cost of greater data requirements and more complex interpretation. None is automatically preferable: the chosen model should reflect the prediction target and have adequate support in the data.

A common mistake is to report a transition hazard as though it were a horizon-specific probability—for example, calling a hazard of \(0.08\) per month an eight-percent six-month risk. The units alone show the problem: the hazard is a rate, whereas the risk is a probability over a specified horizon. The correction is to integrate the transition hazard while accounting for survival in the current state and competing exits, as in the worked calculations. Another mistake is to omit the prior-event condition and present a history-specific prediction as if it applied to everyone in the current state.

Key takeaway: Translate a fitted rule into a conditional risk by naming the current state, sojourn time when relevant, prior history, prediction horizon, and event. For first exits, combine the target transition hazard with survival against all competing exits.

Check Your Understanding

Try each question, then compare with the short solutions below.

  1. A person is in state R with a target-transition hazard of \(0.05\) per month and a competing-exit hazard of \(0.05\) per month, both constant. What is the probability that the first exit is the target transition within four months?
  2. Why is a risk conditional on a prior event not automatically the risk for all people currently in that state?
  3. For a three-month prediction, a model reports only the target-transition hazard. What additional information is needed to calculate a first-transition risk?
  4. Explain the distinction between the probability of a first transition from A to B and the probability of reaching B at any point after starting in A.

Solutions. 1. The total hazard is \(0.10\) per month, so the risk is \(\frac{0.05}{0.10}(1-e^{-0.10(4)})=0.5(1-e^{-0.4})\approx0.1648\), or 16.48%. 2. The prior event defines a subgroup with its own conditional rule; other people in the state may have different histories and fitted risks. 3. One needs the hazards for all competing exits over the horizon, along with their time variation and the specified history conditions. 4. A first-transition risk counts only an A\(\to\)B transition that occurs before any other exit from A; reaching B later can also involve other transitions and requires rules for subsequent states.

Clinical Biostats