Tutorials › Competing Risks and Multi-State Models › Transition-Specific Risk Sets And Event Counts

Transition Intensities and Probabilities · Tutorial 270 of 699

Transition-Specific Risk Sets And Event Counts

Define and construct risk-set sizes and observed transition counts for each directed transition, including careful handling of eligibility and censoring at event times.

Advanced 11 min read

What You'll Learn

  • Define a transition-specific at-risk count using state occupancy, observation status, and eligibility.
  • Define an observed transition count without counting events outside the eligible risk set.
  • Use immediately-before-event status to handle censoring and transitions at a shared time.
  • Construct a complete risk-set table for the transitions in an illness-death model.
  • Distinguish transition-specific risk sets from simple counts of people in each state.
  • Diagnose inconsistent eligibility rules and event records.

Why Count Risk Sets by Transition?

A multi-state record describes how each participant moves among states over time. To summarize what was observed for a particular directed transition, such as healthy to illness, two counts are needed at each event time: how many participants were eligible to make that transition and under observation just beforehand, and how many made the transition at that time. These counts are transition-specific. A person may be in the same state as another participant but not belong to the same transition-specific risk set if the study’s eligibility rules differ.

The tutorial on designing a state space established how a study question determines the states and permitted directed transitions. Here, take the diagram as given and focus on constructing the counts for its transitions. The counts describe the observed data; they are not themselves transition-intensity estimates.

Definition: For participant \(i\), let \(X_i(t-)\) denote the state occupied immediately before time \(t\). Let \(R_i(t-)=1\) when the participant is under observation and still at risk of a further recorded transition immediately before \(t\), and \(R_i(t-)=0\) otherwise. Let \(E_{ihj}(t-)=1\) when participant \(i\) is eligible, under the study’s specified rules, for the directed transition \(h\to j\) immediately before \(t\), and \(E_{ihj}(t-)=0\) otherwise. The transition-specific at-risk count is $$ Y_{hj}(t)=\sum_{i=1}^{n} I\{R_i(t-)=1,\ X_i(t-)=h,\ E_{ihj}(t-)=1\}. $$ The observed transition count is $$ dN_{hj}(t)=\sum_{i=1}^{n} I\{R_i(t-)=1,\ X_i(t-)=h,\ E_{ihj}(t-)=1,\ \text{an observed }h\to j\text{ transition for }i\text{ is recorded at }t\}. $$ Thus an observed transition contributes to \(dN_{hj}(t)\) only when the participant also belongs to the eligible, observed risk set for \(h\to j\) just before \(t\).

The indicator \(I\{\cdot\}\) equals 1 when all the conditions inside the braces hold and 0 otherwise. In a simple state diagram, every participant under observation in state \(h\) may be eligible for every outgoing transition from \(h\); then \(E_{ihj}(t-)=1\) for those transitions. Eligibility is written explicitly because real study rules can impose additional restrictions, for example a defined analysis subgroup or a protocol-specific criterion. It should not be silently assumed that state occupancy alone determines eligibility.

Timing Conventions and a Useful Check

Risk-set membership is determined immediately before \(t\), not after events at \(t\) have been processed. Consequently, a participant whose censoring time is \(t\) is counted as under observation just before \(t\), provided the study records that participant through that instant. The censoring itself is not a transition event. After that time, the participant is no longer included. A participant who makes a transition out of state \(h\) at \(t\) is likewise in the risk set for that transition immediately beforehand.

For a participant to contribute to \(dN_{hj}(t)\), all the conditions in the definition must hold. In particular, a recorded transition label does not override a failed eligibility condition. If a record appears to show a transition that the stated eligibility rules prohibit, the analyst should check the data and rules; the count must not quietly include that record as an eligible event.

Counting check: Every participant counted in \(dN_{hj}(t)\) must also be counted in \(Y_{hj}(t)\). Therefore \(dN_{hj}(t)\leq Y_{hj}(t)\). This follows because the event-count indicator requires all the conditions in the at-risk indicator, plus the additional condition that the transition is recorded at \(t\).

Worked Illness-Death Dataset

Consider a hypothetical illness-death process with states 0 (healthy), 1 (ill), and 2 (dead). State 2 is absorbing. The allowed directed transitions are \(0\to1\), \(0\to2\), and \(1\to2\). Six participants begin in state 0 at time 0. Assume all six meet the eligibility rules for every transition available from their current state. Each listed time is measured in years from study entry.

ParticipantObserved record
A\(0\to1\) at year 2; \(1\to2\) at year 5
B\(0\to2\) at year 3
CCensored in state 0 at year 4
D\(0\to1\) at year 4; \(1\to2\) at year 6
E\(0\to2\) at year 6
FCensored in state 0 at year 2

Worked Example: Constructing the Risk-Set Table

Find the transition-specific at-risk counts and observed transition counts at each time when a transition is observed. Use the immediately-before-time convention, so participants censored at an event time remain under observation just before that time.

At year 2, all six participants are still in state 0 immediately beforehand. Thus \(Y_{01}(2)=6\) and \(Y_{02}(2)=6\), while nobody is in state 1, so \(Y_{12}(2)=0\). A makes a \(0\to1\) transition, so \(dN_{01}(2)=1\); the other two event counts are 0. F’s censoring at year 2 does not count as a transition.

At year 3, A has moved to state 1 and F has been censored. B, C, D, and E remain observed in state 0. Therefore \(Y_{01}(3)=4\) and \(Y_{02}(3)=4\). A is the sole participant in state 1, so \(Y_{12}(3)=1\). B makes a \(0\to2\) transition, giving \(dN_{02}(3)=1\).

At year 4, just beforehand, C, D, and E are in state 0, while A is in state 1. Hence the three at-risk counts are \(Y_{01}(4)=3\), \(Y_{02}(4)=3\), and \(Y_{12}(4)=1\). D makes a \(0\to1\) transition, so \(dN_{01}(4)=1\). C’s censoring at that same time does not remove C from the risk set immediately beforehand.

At year 5, E is the only participant still observed in state 0, and A and D are in state 1. The risk counts are therefore 1, 1, and 2 for \(0\to1\), \(0\to2\), and \(1\to2\), respectively. A makes a \(1\to2\) transition, so \(dN_{12}(5)=1\).

At year 6, E is in state 0 and D is in state 1 immediately beforehand. Thus the risk counts are 1, 1, and 1. E makes a \(0\to2\) transition and D makes a \(1\to2\) transition, so both corresponding event counts equal 1.

The completed table is:

Time \(t\) (years)\(Y_{01}(t)\)\(dN_{01}(t)\)\(Y_{02}(t)\)\(dN_{02}(t)\)\(Y_{12}(t)\)\(dN_{12}(t)\)
2616000
3404110
4313010
5101021
6101111

Each row gives the risk-set sizes for all three allowed transitions, not merely the transitions occurring at that time. For instance, at year 5 the \(0\to2\) risk set has size 1 even though no \(0\to2\) event occurs then. This distinction is useful whenever later calculations require a denominator for a transition at a specified time.

Deriving the Event-Count Check

The relationship between the two counts follows directly from their definitions. For fixed \(h\), \(j\), and \(t\), write the risk-set indicator for participant \(i\) as \(A_i(t)\), and the indicator that an eligible observed \(h\to j\) transition is recorded at \(t\) as \(B_i(t)\). The event-count indicator is \(A_i(t)B_i(t)\): an event is counted only if the risk-set conditions and the recorded-transition condition both hold. Since indicators are either 0 or 1, \(A_i(t)B_i(t)\leq A_i(t)\) for every participant. Summing over participants gives:

$$ dN_{hj}(t)=\sum_i A_i(t)B_i(t) \leq \sum_i A_i(t)=Y_{hj}(t). $$

This is a basic consistency check, not a model assumption. If a table has \(dN_{hj}(t)>Y_{hj}(t)\), its construction is wrong. Under a single-transition-per-person-at-a-time data structure, a participant cannot contribute more than one observed \(h\to j\) transition at the same instant. If the data permit multiple records per participant at one time, the event-count definition and data structure need to be checked before interpreting the count.

Worked Example: Applying an Eligibility Restriction

Suppose a separate hypothetical analysis concerns only participants assigned to Group A. At year 3, three participants are observed in state 0 immediately beforehand. Two are in Group A and one is in Group B. All three have a recorded \(0\to2\) transition at year 3, but the target analysis defines eligibility for \(0\to2\) as membership in Group A.

The two Group A participants satisfy the observation, state, and eligibility conditions, so \(Y_{02}(3)=2\). Both have eligible observed transitions, giving \(dN_{02}(3)=2\). The Group B participant is in state 0 and has a recorded transition, but does not satisfy \(E_{i02}(3-)=1\); that participant contributes to neither count for this Group A analysis. In the full-cohort analysis, with all three participants eligible, the corresponding counts would instead be \(Y_{02}(3)=3\) and \(dN_{02}(3)=3\).

This example shows why the target population and transition eligibility must be stated before counting. If eligibility is defined only by the state diagram, the Group A restriction should not be applied. If an event appears in a record but violates the eligibility rule selected for the analysis, investigate the rule and coding rather than including the event inconsistently.

Diagnostics, Alternatives, and Limits

A reliable risk-set table can be checked against participant histories. At each event time, verify state occupancy immediately beforehand, observation status, eligibility for the particular transition, and the transition actually recorded. Counts should also evolve consistently: participants who transition out of a state no longer belong to that state’s later risk sets, and participants censored at an earlier time are no longer under observation. Transitions into a state can place a participant in a subsequent risk set for an allowed outgoing transition.

A common shortcut is to count everyone currently in state \(h\) as at risk for every outgoing transition. That works only when all such people are observed and eligible for every relevant transition. A second shortcut is to count events by their recorded labels alone. It fails whenever the event record does not meet the specified risk-set conditions. The transition-specific definition prevents both errors.

These counts differ from a simple state-occupancy table. An occupancy count asks how many participants are in state \(h\) at a time; \(Y_{hj}(t)\) asks how many are observed in state \(h\) and eligible for the particular transition \(h\to j\), immediately before \(t\). They also differ from a denominator formed from the original cohort size, which ignores subsequent transitions and censoring. The risk-set counts are descriptive inputs to later transition analyses; by themselves, they do not account for sampling uncertainty, establish a causal effect, or solve problems caused by incorrect state classification or incomplete observation.

Key takeaway: For each directed transition and event time, count eligible participants who are observed in the transition’s origin state immediately beforehand. Count an event only when the participant also satisfies those same risk-set conditions and the transition is recorded at that time.

Check Your Understanding

Answer each question using the definitions above. Brief solutions follow the questions.

  1. At time \(t\), four participants are observed in state 0 and eligible for \(0\to1\). One of the four makes that transition at \(t\). What are \(Y_{01}(t)\) and \(dN_{01}(t)\)?
  2. A participant is censored at time \(t\), having been observed in state 0 immediately beforehand. Does that participant contribute to \(Y_{02}(t)\), assuming eligibility, and to \(dN_{02}(t)\)?
  3. At time \(t\), five participants are observed in state 1, but only three are eligible for \(1\to2\). One eligible participant makes that transition. Give both counts.
  4. For a specified analysis, a recorded \(0\to2\) event belongs to a participant who is not eligible for \(0\to2\). Should it contribute to the event count for that analysis? What should the analyst check?

Solutions. (1) \(Y_{01}(t)=4\) and \(dN_{01}(t)=1\), because all four satisfy the risk-set conditions and one has the recorded transition. (2) The participant contributes 1 to \(Y_{02}(t)\), because censoring at \(t\) occurs after the immediately-before-\(t\) risk status; the participant contributes 0 to \(dN_{02}(t)\), because censoring is not a transition to state 2. (3) \(Y_{12}(t)=3\) and \(dN_{12}(t)=1\); the two ineligible participants are excluded despite being in state 1. (4) No. The event-count indicator includes eligibility, so the event is excluded from that analysis’s count. Check whether the eligibility rule or event coding is inconsistent, and correct the definition or record if needed before proceeding.

Clinical Biostats