Why the Time Origin Matters
A transition prediction is meaningful only after its time origin and horizon have been specified. In a semi-Markov model, the transition process can depend on how long a person has occupied the current state. Consequently, “transition within six months” is incomplete unless it says whether those six months begin at cohort entry, entry into the current state, or some later point in the sojourn.
Suppose two patients enter the same intermediate state at different calendar dates. A prediction of transition within six months of entering that state concerns the same duration in state for both patients, even though its calendar end date differs. Comparing that prediction with outcomes counted from a common calendar date would use a different horizon for each patient. Such a comparison can make a well-calibrated duration-based prediction appear inaccurate—or conceal genuine miscalibration.
Define the Prediction Target on the Duration Scale
Write \(X_i(t)\) for subject \(i\)'s state at calendar time \(t\). For a transition out of state \(r\), let \(q_{rj}(s\mid z)\) denote the transition intensity to destination \(j\), at sojourn duration \(s\), for covariates \(z\). The total intensity out of \(r\) is \(q_{r\cdot}(s\mid z)=\sum_{k\ne r}q_{rk}(s\mid z)\), where the sum includes the possible destinations. In a semi-Markov model, these intensities may vary with elapsed time in the current state; the transition law is not required to depend only on calendar time or on time since the original study baseline.
For a subject who is in \(r\) at sojourn duration \(s_0\), the predicted probability of transition to \(j\) by \(s_0+h\), before any other transition out of \(r\), is the cause-specific cumulative incidence over that duration interval:
The exponential term is the probability of remaining in \(r\) without a transition from duration \(s_0\) through duration \(u\), under the specified intensities. The integral adds the probability of making the transition to \(j\) at each possible duration \(u\), while still in \(r\). The predicted probabilities for competing destinations are not separate probabilities of hypothetical worlds in which other destinations cannot occur: each is computed with the total intensity out of \(r\) in the survival term.
When the forecast starts at state entry, \(s_0=0\). If it starts later, the subject must actually still be in \(r\) at \(s_0\); the target is then conditional on that state occupancy. Predictions and validation outcomes must use the same origin, horizon, state definition, destination, and conditioning set.
Aligning Predictions and Outcomes
A practical validation record should identify the state-entry time, the duration at which the prediction is issued, the horizon, and the observed transition status by the corresponding end duration. For entry-based predictions, an outcome is whether the specified transition occurred by \(E_i+h\), with competing transitions treated according to the target being evaluated. For a prediction issued at \(E_i+s_0\), the subject is eligible only if still in \(r\) at that time, and follow-up for that prediction runs to \(E_i+s_0+h\).
The validation sample is therefore conditional on reaching the state and, for \(s_0>0\), remaining there until the prediction origin. This is appropriate when the intended use is to predict for people currently occupying that state. It is not automatically an estimate of performance in the original baseline cohort. If the clinical question concerns the baseline cohort, predictions and outcomes must instead be defined for that cohort and its original time origin.
Worked Example: Two Entry Dates, One Six-Month Sojourn Horizon
Suppose two hypothetical patients enter state \(r\): patient A at calendar month 2 and patient B at calendar month 8. Each receives a prediction at entry for transition to state \(j\) within six months. Both have a predicted probability of 0.30. Assume each patient is observed through the full six-month horizon, with no censoring before the outcome can be determined.
For A, the prediction interval is calendar month \(2+6=8\). For B, it is calendar month \(8+6=14\). The target for each is the same: transition to \(j\) within six months of entering \(r\). Suppose A transitions to \(j\) in month 7, five months after entry, and B has no transition out of \(r\) through month 14. Their binary outcomes by their respective horizons are \(Y_A=1\) and \(Y_B=0\).
For a Brier-score illustration, the squared prediction errors are \( (0.30-1)^2=0.49 \) for A and \( (0.30-0)^2=0.09 \) for B. Their mean is \( (0.49+0.09)/2=0.29 \). This calculation is valid only for the stated binary target and complete outcome ascertainment. If instead both patients were assessed at calendar month 14, A would have had 12 months since entering \(r\), whereas B would have had six. Those outcomes would not evaluate the same six-month-from-entry predictions.
A Duration-Dependent Competing-Risks Calculation
The following hypothetical model shows why the duration interval itself must be aligned. Suppose a subject is in state \(r\), with two possible destinations, A and B. Let \(s\) be measured in years since entry into \(r\). The intensities, in transitions per year, are \(q_{rA}(s)=0.10\) for \(s<2\) and \(0.30\) for \(s\ge2\), while \(q_{rB}(s)=0.10\) throughout. These piecewise-constant intensities are assumed to apply to the subject under consideration, and there is no censoring during the prediction interval.
Worked Example: Predicting From Sojourn Duration 1.5 Years
Calculate the probabilities of transition to A and B during the next year, conditional on still being in \(r\) at duration \(s_0=1.5\) years. The interval crosses the change in the intensity to A at two years, so it consists of two half-year pieces.
From duration 1.5 to 2 years, the total intensity is \(0.10+0.10=0.20\) per year. The probability of no transition through this first half-year is \(e^{-0.20(0.5)}=e^{-0.1}=0.9048374\). The probability of A during this piece is \( (0.10/0.20)(1-e^{-0.1})=0.04758129 \); the probability of B is the same, \(0.04758129\).
From duration 2 to 2.5 years, the total intensity is \(0.30+0.10=0.40\) per year. Conditional on reaching duration 2 without leaving \(r\), the probability of A during this piece is \( (0.30/0.40)(1-e^{-0.40(0.5)})=0.13595193 \). The corresponding conditional probability of B is \( (0.10/0.40)(1-e^{-0.40(0.5)})=0.04531731 \). Each must be multiplied by the probability \(e^{-0.1}\) of reaching duration 2 without a transition.
Thus the full one-year probabilities, conditional on being in \(r\) at duration 1.5, are
The probability of no transition over the full year is \(e^{-0.1}e^{-0.2}=e^{-0.3}\approx0.7408\). The three probabilities sum to approximately \(0.1706+0.08859+0.7408=1.000\), as required. This check also confirms that the probability of B is not obtained by treating B as the only possible exit: the competing intensity to A reduces the probability of remaining in \(r\).
Derivation of the Conditional Risk Formula
The formula for \(F_{rj}\) follows by considering a small duration increment \(du\). Conditional on still being in \(r\) at duration \(u\), the probability of a transition to \(j\) in that increment is \(q_{rj}(u\mid z)du+o(du)\). The probability of no exit from \(r\) between \(s_0\) and \(u\) is
This survival expression solves the hazard relation \(dS_r(u)/du=-q_{r\cdot}(u\mid z)S_r(u)\), with \(S_r(s_0\mid s_0,z)=1\). Multiplying the probability of reaching duration \(u\) without leaving \(r\) by the instantaneous transition probability to \(j\), then summing across \(u\) from \(s_0\) to \(s_0+h\), gives the cumulative-incidence integral. The derivation assumes the specified intensities adequately describe exits from \(r\) conditional on the stated covariates and sojourn duration; it does not justify those modeling assumptions from data.
Conditions, Diagnostics, and Alternatives
Duration-aligned validation requires a clearly defined state-entry time and a prediction horizon expressed on the same duration scale as the observed outcome. The prediction must be made before the outcome interval, and the validation sample must represent the intended prediction population. State transitions must be ascertained consistently. If follow-up is censored before the horizon, the outcome is not simply “no transition”; methods that account for right censoring, such as inverse-probability-of-censoring weighting (IPCW), require their own censoring assumptions and diagnostics.
The semi-Markov structure also matters. If transition risks depend on calendar period, unrecorded history, or other variables beyond current state and sojourn duration, a duration-only specification may be inadequate. Subjects entering \(r\) in different calendar periods may not be exchangeable if care or population composition changes. Consider including relevant predictors, assessing performance by entry period, or defining the target population more narrowly. Alignment removes a time-origin mismatch; it does not correct a misspecified prediction model or an unrepresentative validation sample.
Useful checks include verifying that calculated horizons equal \(E_i+s_0+h\) for each subject, tabulating numbers at risk at each sojourn duration, and checking that every outcome was observed through its own horizon or handled using an appropriate censoring method. Plot calibration or performance summaries against the stated duration horizon, rather than against an ambiguously defined calendar follow-up time. Large differences in entry dates, abrupt changes in risk by duration, or unexpected metric changes after correcting the time origin can reveal a mismatch or a model limitation.
| Approach | Time scale and target | When it is appropriate |
|---|---|---|
| Sojourn-time alignment | Horizon begins at entry into the current state, or at a specified duration within that sojourn | When the prediction depends on duration in the current state |
| Calendar-time alignment | Horizon is tied to a common calendar date or period | When the scientific target is tied to calendar timing, and calendar-time effects are part of the prediction |
| Time since original cohort entry | Horizon begins at the study or cohort baseline | When evaluating predictions made for the original cohort, rather than conditional predictions for current state occupants |
These approaches answer different questions; they are not interchangeable scoring conventions. The earlier material on transition-specific Brier scores and calibration provides metrics for comparing predictions with outcomes, but the metric cannot repair an incorrectly defined outcome window. A further limitation is that conditioning on entry into a state selects a subgroup: performance among state entrants need not describe performance among the baseline cohort. Finally, a good validation score over one duration range does not establish accuracy at durations with little data or in a population with different transition patterns.
Common Mistake
- Wrong reasoning: “Everyone has a six-month prediction, so I can assess everyone at the same calendar date six months after the study began.”
- Correction: A six-month horizon from state entry ends at \(E_i+6\) months, which varies by subject. The observed transition status must be assessed at that individual-specific endpoint. A common calendar endpoint gives different sojourn durations and therefore evaluates a different target.
- Another error: Treating a person who leaves state \(r\) for a competing destination as if they remained in \(r\) but did not experience the target transition. The correct outcome depends on the defined target: for a cumulative incidence of transition to \(j\), competing exits prevent a later \(r\)-to-\(j\) transition during that same sojourn.
Check Your Understanding
Answer each question using the stated time origin. Solutions follow the questions.
- A subject enters state \(r\) at calendar month 5 and receives a three-month-from-entry prediction. At what calendar month does the outcome window end?
- Why must a prediction made at sojourn duration \(s_0=4\) months be evaluated only among subjects still in state \(r\) at that duration?
- For two competing destinations, why does the risk formula for one destination include the total exit intensity in its survival term?
- A prediction is issued at state entry for transition within six months. A subject is censored two months after entry without a recorded transition. Can the subject be coded as having no transition by six months? State one general approach that may address this issue.
Solutions. (1) Month \(5+3=8\). (2) The prediction is conditional on occupying \(r\) at its origin; someone who has already left \(r\) is not in the target population for that prediction. (3) Any exit from \(r\) prevents a later transition from \(r\) to the target destination during that sojourn, so competing exits reduce the probability of remaining at risk. (4) No. The outcome through six months is unknown after censoring at month 2; an appropriate censoring-adjusted method, such as IPCW under its assumptions, may be used.