Why Encode the Immediately Preceding State?
A transition intensity can depend on more than the state occupied now. For example, two individuals may both be in a clinical state \(C\), yet one may have entered \(C\) from state \(A\) and the other from state \(B\). If those histories predict different rates of leaving \(C\), a model based only on the current state treats distinct risk situations as identical. A compact way to represent this particular piece of history is to record the state immediately preceding the current one.
The aim here is to formulate that representation precisely. It is a choice of predictor for an underlying transition process; it does not itself assert that the resulting process is Markov, nor that the history effect is causal. It also does not replace the distinction between the process being modelled and whether that process is observed.
For a finite set of possible preceding states \(q\), define \(H_q(t-)=I\{L(t-)=q\}\), where \(I\{\cdot\}\) is an indicator. While the process is in \(r\), exactly one of the applicable preceding-state indicators is one; the others are zero. The category \(\varnothing\) can be included as another indicator when needed. Once a transition \(r\to s\) occurs, the current state becomes \(s\) and the immediately preceding state for the new visit to \(s\) is \(r\).
Underlying Intensities and Observation
The history indicator belongs in a model for the underlying process. Let \(\mathcal{F}_{t-}\) denote the process history available immediately before time \(t\), and let \(N_{rs}(t)\) count underlying transitions from \(r\) to \(s\) by time \(t\). For an allowed transition \(r\to s\), define its transition-specific hazard, conditional on the process being in \(r\) and on its history, by
Equivalently, the small-interval transition probability, conditional on that history and on being in \(r\), is \(\lambda_{rs}(t\mid q,\mathcal{F}_{t-})\Delta t+o(\Delta t)\). This is an instantaneous rate, not a probability: its units are inverse time. The probability of two or more jumps in an interval of length \(\Delta t\) is assumed to be \(o(\Delta t)\), as in the usual continuous-time intensity formulation.
This hazard is defined for the underlying process, whether or not a researcher happens to observe the individual at time \(t\). If \(C\) is the end of observation, the observed at-risk indicator for the \(r\to s\) transition is \(Y_r(t)=I\{C\ge t,\ X(t-)=r\}\). The observed transition-counting process has intensity \(Y_r(t)\lambda_{rs}(t\mid L(t-),\mathcal{F}_{t-})\). Ending observation removes the individual from the observed risk set; it does not make the underlying transition hazard zero.
The reference category convention avoids including a redundant intercept and a full set of category indicators in the same linear predictor. The model must also respect the transition structure: an intensity is specified only for transitions allowed from the current state. A preceding-state category with no possible or observed route into \(r\) is not a meaningful comparison for that risk set.
Worked Examples
Worked Example: Updating the Recent-Transition Indicator
Consider a hypothetical process with states \(A,B,C\), and \(D\), where \(D\) is absorbing. An individual's observed path is \(A\to C\to B\to C\). State \(C\) has two possible exits, to \(A\) or to \(D\). Identify the current and preceding states during each visit to \(C\).
During the first visit to \(C\), the entry transition was \(A\to C\). Therefore \(X(t-)=C\), \(L(t-)=A\), and \(H_A(t-)=1\) until the transition \(C\to B\). The other preceding-state indicators for that visit are zero.
During the second visit to \(C\), the entry transition was \(B\to C\). Thus \(X(t-)=C\), \(L(t-)=B\), and \(H_B(t-)=1\) until the next jump. The current state is again \(C\), but the recent-transition category differs. A model with rates \(\lambda_{CA}^{(A)}(t)\) and \(\lambda_{CD}^{(A)}(t)\) for one visit and \(\lambda_{CA}^{(B)}(t)\) and \(\lambda_{CD}^{(B)}(t)\) for the other can represent that distinction.
The history indicator changes at a jump, not continuously with time in \(C\). If elapsed duration in \(C\) is also meant to affect risk, that is a separate predictor and should be specified separately.
Worked Example: Comparing Exit Risks Over Two Months
Suppose, hypothetically, that while in \(C\) the underlying cause-specific intensities are constant over the next two months. For those whose preceding state is \(A\), let \(\lambda_{CA}=0.12\) per month and \(\lambda_{CD}=0.03\) per month. For those whose preceding state is \(B\), let the corresponding rates be \(0.06\) and \(0.04\) per month. Assume the rates remain constant during the interval until the first exit from \(C\), and that the only exits are to \(A\) and \(D\).
For constant competing intensities, the total exit rate is \(\Lambda=\lambda_{CA}+\lambda_{CD}\). The probability of exiting to \(A\) by time \(\tau\), before any exit to \(D\), is
For preceding state \(A\), \(\Lambda=0.12+0.03=0.15\) per month. At \(\tau=2\) months, the probability of exit to \(A\) is
The probability of exit to \(D\) is \((0.03/0.15)(1-e^{-0.30})\approx0.0518\), and the probability of remaining in \(C\) is \(e^{-0.30}\approx0.7408\). These sum to one, up to rounding.
For preceding state \(B\), \(\Lambda=0.06+0.04=0.10\) per month. The probability of exit to \(A\) is
The probability of exit to \(D\) is \((0.04/0.10)(1-e^{-0.20})\approx0.0725\), and the probability of remaining in \(C\) is \(e^{-0.20}\approx0.8187\). The calculations describe different conditional risks for two history groups; they do not imply that entering \(C\) from one state causes a different outcome.
Worked Example: Estimating History-Stratified Rates From Person-Time
In a hypothetical dataset, individuals contribute observed time in \(C\), classified by the state immediately preceding their current visit. Suppose the data show 40 person-months with preceding state \(A\), including 5 transitions to recovery state \(R\) and 2 to \(D\). They also show 30 person-months with preceding state \(B\), including 3 transitions to \(R\) and 3 to \(D\). For a simple constant-intensity description within each history group, estimate each rate by its event count divided by its observed person-time.
For the \(C\to R\) transition after preceding state \(A\), the estimated rate is \(5/40=0.125\) per person-month. For \(C\to D\), it is \(2/40=0.0500\) per person-month. After preceding state \(B\), the corresponding estimates are \(3/30=0.100\) and \(3/30=0.100\) per person-month.
The estimated \(C\to R\) rate ratio comparing \(B\) with \(A\) is \(0.100/0.125=0.800\). The estimated \(C\to D\) rate ratio is \(0.100/0.0500=2.00\). These are descriptive rate comparisons based on the stipulated constant-rate model, not evidence of a causal effect. Their precision cannot be judged from the point estimates alone.
This calculation treats the recorded person-time as time observed and at risk in the relevant history category. It requires correct transition and risk-time classification; estimation from censored follow-up additionally relies on observation ending being non-informative for the transition process, at least conditional on variables included in the analysis.
Why the Indicator Form Works
Suppose that, for people currently in \(r\), the model allows a distinct intensity \(\lambda_{rs}^{(q)}(t)\) for each possible preceding state \(q\). Since exactly one history category applies at a time, the history-specific intensity can be written as a sum of category indicators:
To verify this expression, fix a time when \(L(t-)=q^\ast\). Then \(I\{L(t-)=q^\ast\}=1\), and all other indicators in the sum are zero. The sum therefore reduces to \(\lambda_{rs}^{(q^\ast)}(t)\), exactly the intensity assigned to the observed history category. This argument depends on the categories being exhaustive and mutually exclusive for the relevant risk set. An unclassified initial history must be represented explicitly or excluded according to a prespecified rule; it cannot silently be assigned to a different category.
In a regression implementation, the same logic gives a category-specific linear predictor. Choosing one category as the reference sets its coefficient to zero, and the remaining coefficients compare each history category with that reference. If an interaction with time or another predictor is included, the rate ratio need not remain constant across those values.
Assumptions, Diagnostics, and Alternatives
A recent-transition model is meaningful only when the history is recorded with adequate accuracy and timing. The transition graph and the allowed exits from each current state should be specified. The transition process should satisfy the small-interval intensity formulation, and the chosen history categories should be defined before comparing their rates. When estimating from observed follow-up, censoring and delayed entry must be handled in the risk sets; the underlying hazard must not be confused with the observation indicator.
Useful checks include verifying that every recorded spell in \(r\) has the intended preceding-state label, counting person-time and transitions separately for each history category, and examining whether any category has too little data for a stable estimate. A category with very few transitions may produce imprecise or unstable rate ratios. If a category has no observed events, a finite unpenalized log-linear coefficient may not be estimable. Sparse strata can sometimes be combined only when substantively defensible, not merely to obtain a convenient result.
Also assess whether the chosen intensity form is plausible over time. For example, a model that assumes a constant rate ratio between preceding-state categories can be inadequate if the contrast changes with calendar time or duration in the current state. Residual or observed-versus-expected event summaries by time and history group can reveal systematic discrepancies. These checks diagnose mismatches; they do not prove that the specified history captures all relevant dependence.
The earlier material on History-Dependent Transition Intensities motivates conditioning on process history generally. A recent-state indicator is one particular, parsimonious encoding. It differs from a duration-dependent specification, which uses time since entry into the current state, and from a clock-forward specification, which uses time since a common origin. These predictors can be combined when justified, but they answer different modelling questions. A model with only the current state is simpler and may be adequate if recent origin adds no predictive information; a richer history specification can be useful when immediate origin matters, but costs precision and may not capture longer memory.
A preceding-state indicator records only one feature of the path. It does not distinguish paths that have the same current state and same immediate predecessor but differ earlier, nor does it automatically account for repeated visits, cumulative exposure, or all possible ordering patterns. Nor does finding an association between preceding state and an intensity establish a causal mechanism. The model describes conditional transition rates under its assumptions.
Check Your Understanding
Answer each question, then compare your reasoning with the solutions.
- An individual follows \(A\to B\to C\). During the visit to \(C\), what are the current state and immediately preceding state?
- If \(H_A(t-)=1\) while \(X(t-)=C\), what must be true of the other mutually exclusive preceding-state indicators for that visit?
- For a constant \(C\to R\) rate of \(0.08\) per month and a \(C\to D\) rate of \(0.02\) per month, calculate the probability of exiting to \(R\) within one month before exiting to \(D\).
- An observed risk-set indicator is zero after censoring. Does this make the underlying transition hazard zero? State the correct observed-intensity expression.
- Give one diagnostic concern when a model includes several preceding-state categories.
Solutions. (1) The current state is \(C\), and the immediately preceding state is \(B\), because the entry transition was \(B\to C\). (2) Every other applicable preceding-state indicator is zero; the categories are mutually exclusive. (3) The total rate is \(0.08+0.02=0.10\) per month, so the probability is \((0.08/0.10)(1-e^{-0.10})\approx0.07613\). This is conditional on starting in \(C\) in the stated history group, under constant competing rates. (4) No. The observed counting-process intensity is \(Y_C(t)\lambda_{CR}(t\mid L(t-))\); censoring sets the observed risk indicator to zero but does not define the underlying hazard. (5) For example, a category may have very little person-time or few transitions, yielding unstable or imprecise estimates; check history-stratified risk time and event counts.