Tutorials › Competing Risks and Multi-State Models › Risk Sets for Transition-Specific Regression

Regression for Multi-State Data · Tutorial 345 of 699

Risk Sets for Transition-Specific Regression

Define who is at risk for each allowed transition at each time, and track how a subject’s eligibility changes as their observed state changes.

Advanced 10 min read

What You'll Learn

  • Write the at-risk indicator for a specified origin-to-destination transition.
  • Construct risk sets using a subject’s state immediately before each time.
  • Handle delayed entry, loss to follow-up, and competing destinations.
  • Track subjects who enter new risk sets after a state transition.
  • Recognize how recurrent transitions can lead to repeated risk-set membership.
  • Diagnose errors caused by using one pooled risk set for every transition.

Why Risk Sets Must Be Transition-Specific

A multi-state history describes how each subject moves among states over time. For regression of a transition intensity, the relevant comparison at a particular time is among subjects who could experience that transition then. This group is the transition-specific risk set. It is not generally the same as the full cohort, nor is it necessarily the same for every transition.

For example, in an illness-death process, a subject in the healthy state may be at risk for both illness and death directly from health. After becoming ill, that subject is no longer at risk for either transition out of health, but may become at risk for death from illness. Defining these sets correctly is a prerequisite to estimating a transition-specific regression target.

Definition: Let \(X_i(t)\) denote subject \(i\)'s state at time \(t\), and let \(h=(r,s)\) be an allowed transition from origin state \(r\) to destination state \(s\). The transition-specific risk set immediately before time \(t\), denoted \(\mathcal{R}_{h}(t)\), contains subjects who have entered observation, are still under observation and eligible immediately before \(t\), and satisfy \(X_i(t-)=r\). Equivalently, the at-risk indicator is \(Y_{ih}(t)=I\{i\in\mathcal{R}_{h}(t)\}\).

The notation \(t-\) means just before \(t\). This timing matters: a subject who makes a transition at time \(t\) is classified using their origin state immediately before the transition. If observation begins at entry time \(L_i\) and ends at \(C_i\), a common convention is that the subject is observed over \((L_i,C_i]\); the study’s event and censoring recording rules determine whether an event exactly at a boundary is known. In all cases, the risk indicator must use information available just before the event time.

The allowed transition set determines which risk sets can be formed. A subject can belong to more than one risk set at the same time if several allowed transitions have the same origin. Membership does not mean that all those transitions occur; it means that each is a possible next transition under the model.

Constructing the Sets From a History

For each transition of interest, apply the same checks at each event time: Is the subject under observation immediately before that time? What state are they in immediately before it? Does that state match the transition’s origin? A subject who fails any check is not in that transition’s risk set.

1
List the allowed transitions.
Write each transition as an ordered origin-destination pair, such as \(1\to2\) or \(2\to3\). Do not treat transitions with different origins as interchangeable.
2
Fix a time and inspect the pre-time history.
Use each subject’s state and observation status immediately before that time, not their state after an event at that time.
3
Apply the origin-state rule.
For transition \(r\to s\), include observed subjects whose state just before the time is \(r\). The destination \(s\) identifies the transition being modeled; it does not change this basic membership rule.
4
Update after a transition or end of observation.
After a subject leaves state \(r\), they leave the risk sets for transitions out of \(r\). If they enter another state, they may join risk sets whose origin is that new state. Censoring or other loss to follow-up removes them from subsequent observed risk sets.

This construction can be expressed through transition counts. Let \(N_{ih}(t)\) count subject \(i\)'s observed transitions of type \(h\) by time \(t\). Under the usual intensity formulation, the conditional instantaneous transition rate has the form \(Y_{ih}(t)\lambda_{ih}(t\mid\mathcal{H}_i(t-))\), where \(\mathcal{H}_i(t-)\) denotes the observed history just before \(t\). The indicator is zero when the transition is not currently possible for that subject in the observed process.

Justification: If \(Y_{ih}(t)=0\), the subject is not observed and eligible for transition \(h\), or is not in its origin state immediately before \(t\). They cannot contribute an observed jump of type \(h\) at \(t\), so the intensity for that transition is zero for them. If \(Y_{ih}(t)=1\), they are eligible for the transition; their intensity may be positive, but this does not imply that the transition will occur.

The risk set records eligibility, not the probability that a transition will occur. Estimating a regression model also requires appropriate assumptions about the transition process and observation, including suitable handling of censoring and covariates. The set construction itself is a bookkeeping rule; it does not make those assumptions true.

Worked Example: Two Competing Transitions From the Same State

Consider an illness-death process with allowed transitions \(1\to2\) (illness), \(1\to3\) (death directly from state 1), and \(2\to3\) (death after illness). At time \(t=5\) years, six hypothetical subjects are all still under observation. Their states immediately before year 5 are: A, B, and C in state 1; D and E in state 2; and F in state 3. At year 5, A becomes ill and D dies after illness.

For \(1\to2\), the origin is state 1. Thus \(\mathcal{R}_{1\to2}(5)=\{A,B,C\}\). For \(1\to3\), the origin is also state 1, so \(\mathcal{R}_{1\to3}(5)=\{A,B,C\}\) as well. Both transitions have the same risk set immediately before year 5, even though their destinations differ.

For \(2\to3\), the origin is state 2, giving \(\mathcal{R}_{2\to3}(5)=\{D,E\}\). F is in state 3, so F is not in any of these risk sets. A’s observed transition at year 5 is \(1\to2\), and D’s is \(2\to3\). Their event classifications agree with their respective pre-time risk-set memberships.

Immediately after the events, A is in state 2 and D is in state 3. If both remain under observation, A can be included in the risk set for \(2\to3\) at a later time; D cannot. Neither remains eligible for a transition whose origin is state 1.

Membership Changes Over a Subject’s History

A subject’s membership is time-dependent. It is determined by the current pre-time state and observation status, not by the subject’s initial state or by every state they have ever occupied. Consequently, a subject can contribute to different transition-specific risk sets at different times.

Worked Example: Following One Subject Across Transitions

Suppose a hypothetical subject enters observation at time 0 in state 1, transitions from state 1 to state 2 at time 3, and remains under observation in state 2 until time 8. The allowed transitions are \(1\to2\), \(1\to3\), and \(2\to3\). There are no other transitions for this subject.

At time \(t=2\), the subject is observed and in state 1 immediately before \(t\). They belong to both \(\mathcal{R}_{1\to2}(2)\) and \(\mathcal{R}_{1\to3}(2)\), but not to \(\mathcal{R}_{2\to3}(2)\). The same membership applies immediately before time 3, so the subject is eligible for the observed \(1\to2\) event at that time.

After time 3, the subject is in state 2. At time \(t=4\), they belong to \(\mathcal{R}_{2\to3}(4)\), and no longer belong to either risk set with origin state 1. If follow-up ends at time 8 without a transition, the subject is not included in risk sets after observation ends. Being in the risk set for \(2\to3\) from time 3 onward does not mean the subject will die; it records eligibility during observed follow-up.

Delayed entry and censoring change membership through observation status, not through the origin-state rule. A subject who enters the study in state 2 can contribute to a risk set with origin 2 from their entry onward, but not before entry. A subject censored while in state 2 stops contributing to observed risk sets after censoring. The recorded history must be adequate to determine both state and observation status at each relevant time.

Worked Example: Delayed Entry, Censoring, and a Recurrent Transition

Consider a hypothetical process with states A and B and allowed transitions \(A\to B\) and \(B\to A\). Subject P enters observation at time 2 in state A, makes transitions \(A\to B\) at time 4 and \(B\to A\) at time 7, and is censored at time 9. Subject Q is observed in state A throughout the interval from time 0 to time 10.

At time \(t=1\), P is not observed yet, so P is in neither risk set. At \(t=3\), P is observed in A and belongs to \(\mathcal{R}_{A\to B}(3)\), but not \(\mathcal{R}_{B\to A}(3)\). Immediately before time 4, P is still in A and is eligible for the \(A\to B\) event.

At \(t=5\), P is in B, so P belongs to \(\mathcal{R}_{B\to A}(5)\), not \(\mathcal{R}_{A\to B}(5)\). At \(t=8\), after the transition back to A, P is again in \(\mathcal{R}_{A\to B}(8)\). This is a new period of eligibility for the same transition; it is not a reason to keep P in the \(B\to A\) risk set. After censoring at time 9, P contributes no longer to the observed risk sets. Q remains in \(\mathcal{R}_{A\to B}(t)\) while observed and in A, but is never in \(\mathcal{R}_{B\to A}(t)\) during this history.

For recurrent transitions, risk-set membership can therefore occur in multiple separate intervals. A subject’s previous transition does not by itself exclude them from future membership. The current state, the allowed transition structure, and observed follow-up determine eligibility at each time.

Representing Risk Sets and Checking Them

A practical data representation uses one row per subject-time interval during which the subject’s state and observation status are unchanged. For each allowed transition, a row is eligible when the subject occupies that transition’s origin state. Transition-specific analyses can then select the eligible rows for that transition. This is a data-management representation of the same rule, not a change to the definition.

Question at time \(t\)Include subject in risk set for \(r\to s\)?
Observed and eligible, with \(X_i(t-)=r\)Yes
Observed and eligible, with \(X_i(t-)\ne r\)No
Not yet entered or no longer under observationNo
In state \(r\), with several allowed destinationsYes, in the risk sets for each allowed transition out of \(r\)
Experienced the transition earlier, then returned to \(r\)Yes, if currently observed and eligible in \(r\)

At each event time, compare the event’s transition label with the risk sets constructed from pre-event states. Every observed event of type \(r\to s\) should come from a subject who was in \(\mathcal{R}_{r\to s}(t)\) immediately before the event. If this check fails, likely causes include a state-history coding error, incorrect ordering of event and censoring times, or an incorrect transition label.

Other useful checks include confirming that no subject is counted before delayed entry or after follow-up ends; that state intervals do not overlap inconsistently; and that a subject is not simultaneously assigned to incompatible states at a time. For tied event times, use a consistent pre-time convention: subjects who experience events at the same recorded time are classified by their states immediately before that time, not sequentially updated in an arbitrary order.

Common Pitfalls and Alternatives

  • Using one pooled risk set for every transition. “Everyone still alive is at risk” can be wrong when the transition’s origin is a particular state. Include subjects in \(\mathcal{R}_{r\to s}(t)\) only when they occupy state \(r\) and are observed.
  • Removing a subject from every risk set after their first event. This is incorrect when the subject enters another state and can make a later transition. Update membership according to the new state instead.
  • Classifying an event using the post-event state. The event at \(t\) is from the state occupied just before \(t\); use \(X_i(t-)\) to determine the risk set.
  • Confusing eligibility with outcome probability. Risk-set membership means a transition is possible under the specified process at that time. It does not state how likely the event is.
  • Ignoring the observation window. A state label does not justify inclusion before entry or after censoring. Membership requires observed eligibility at that time.

A pooled model with a common risk set may be appropriate only if its risk-set definition matches the modeled event process and target. Transition-specific risk sets preserve the fact that different transitions can have different origins and eligible populations. The later choice of regression specification determines how transition-specific information is combined; it does not justify pooling subjects who are not in the relevant origin state.

The construction also has limitations. It relies on sufficiently accurate state histories and observation times. If state is only known at intermittent visits, the state immediately before an event may be uncertain and cannot be resolved by the risk-set rule alone. Likewise, correct construction does not address informative censoring, measurement error, or whether the chosen transition structure is scientifically adequate. Those issues require separate modeling and sensitivity assessment.

Key takeaway: For a transition \(r\to s\), form the risk set from subjects observed and eligible immediately before \(t\) whose current state is \(r\). Update membership as histories change; the same subject may enter different transition-specific risk sets, or re-enter one after returning to its origin state.

Check Your Understanding

Answer each question, then compare your reasoning with the solutions.

  1. In a process with transitions \(1\to2\), \(1\to3\), and \(2\to3\), a subject is observed in state 2 just before time \(t\). Which of these three risk sets include the subject?
  2. A subject moves from state A to state B at time 6. Which state determines their risk-set membership for the event at time 6, and which state determines it just after time 6?
  3. A subject enters observation in state B at time 4. Should they be included in the risk set for \(B\to C\) at time 3? Explain.
  4. In a recurrent A-to-B-to-A process, a subject makes \(A\to B\) at time 2 and \(B\to A\) at time 5. Can they enter the \(A\to B\) risk set again after time 5?
  5. Why can two transitions with the same origin have the same risk set immediately before a time, even though they have different destinations?

Solutions. (1) Only \(\mathcal{R}_{2\to3}(t)\), because state 2 is the origin of that transition; the other two require state 1. (2) State A, the pre-event origin state, determines membership for the event at time 6. Just after the transition, state B determines later membership. (3) No. The subject has not entered observation by time 3, so they are not in an observed risk set then. (4) Yes. After returning to A at time 5, the subject can re-enter \(\mathcal{R}_{A\to B}(t)\) at later times while observed. (5) Both risk sets require the same origin state and observation eligibility. Their destination labels distinguish which event type is being modeled, not who is eligible immediately before the event.

Clinical Biostats