Why Risk-Set Membership Needs Care
A risk set is a group of individuals who are counted as being at risk at a particular time. In competing-risks data, the group depends on which hazard is being described. For a cause-specific hazard, the risk set consists of individuals who have not yet experienced any event. For a subdistribution hazard, the risk set for a chosen cause is modified: individuals who have already experienced a competing event are retained in it.
This tutorial focuses on that membership rule. The main practical challenge is to classify each person using both the event time and the event cause, with particular care at the exact time being considered. We will use \(k\) for the focal cause and \(J_i\) for the cause of the first event experienced by individual \(i\).
The event-free condition \(T_i\ge t\) includes a person whose event occurs exactly at \(t\): that person is still event-free immediately before \(t\). The added part of the subdistribution set uses the strict condition \(T_i<t\). Thus, a competing event at \(t\) does not qualify as a prior competing event; immediately before \(t\), that person belongs to both sets because \(T_i\ge t\).
Constructing the Two Sets
For an individual with a recorded first event, compare the event time with \(t\), then check the event cause if the event occurred before \(t\). An earlier event of the focal cause excludes the person from both sets. An earlier event of a competing cause excludes the person from the event-free set but not from the focal cause's subdistribution set. A future event or an event exactly at \(t\) leaves the person in both sets immediately before \(t\).
| History before or at \(t\) | Event-free set at \(t\) | Subdistribution set for cause \(k\) at \(t\) |
|---|---|---|
| Focal event at \(T_i<t\) | Excluded | Excluded |
| Competing event at \(T_i<t\) | Excluded | Included |
| Any first event at \(T_i=t\) | Included immediately before \(t\) | Included immediately before \(t\) |
| No first event before \(t\), so \(T_i>t\) | Included | Included |
The table describes the conceptual risk sets for a complete first-event history. It is useful to write the two membership indicators separately before counting. If \(Y_i(t)=I(T_i\ge t)\) denotes event-free membership, then the subdistribution membership indicator for cause \(k\) can be written as
The two indicators on the right cannot both equal 1: the first requires \(T_i\ge t\), while the second requires \(T_i<t\). Their sum therefore equals an indicator for membership in the union of these two disjoint groups. For \(n\) individuals, the corresponding set sizes are
Here \(R(t)\) is the event-free risk-set size and \(R_k^{*}(t)\) is the subdistribution risk-set size for cause \(k\). The definition is cause-specific: changing the focal cause can change which prior events qualify for retention.
Worked Example: Classifying Membership at Year 7
Consider six hypothetical individuals followed for a first event. Let cause 1 be the focal cause and cause 2 be the competing cause. Their event histories are:
| Individual | First-event time \(T_i\) (years) | Cause \(J_i\) |
|---|---|---|
| A | 2 | 1 |
| B | 4 | 2 |
| C | 6 | 2 |
| D | 7 | 2 |
| E | 9 | 1 |
| F | 11 | 2 |
We determine membership immediately before year 7. Individual A had the focal event at year 2, so \(T_A<7\) and \(J_A=1\); A belongs to neither set. B and C had competing events before year 7, so they are not event-free, but each is included in the cause-1 subdistribution set. D's event occurs at year 7, not before it. Since \(T_D=7\), D is included in both sets immediately before year 7. E and F have event times greater than 7, so they are also in both sets.
The event-free set is \(\{D,E,F\}\), giving \(R(7)=3\). The cause-1 subdistribution set is \(\{B,C,D,E,F\}\), giving \(R_1^{*}(7)=5\). The calculation checks directly against the indicator definition: \(R_1^{*}(7)=0+1+1+1+1+1=5\), in the order A through F. This is a membership calculation, not an estimate of an event probability.
A Short Derivation of the Membership Rule
The subdistribution risk set can be constructed by partitioning individuals according to whether their first-event time is before \(t\). If \(T_i\ge t\), the individual is event-free immediately before \(t\) and is included. If \(T_i<t\), the individual is not event-free; in the subdistribution set, that person is included exactly when the recorded event cause is not \(k\). If instead \(J_i=k\), the person is excluded. These cases exhaust the possible event histories, so the membership indicator is
The cases are disjoint and complete: every \(T_i\) is either at least \(t\) or less than \(t\); in the latter case, the first event either is or is not cause \(k\). This also shows why the subdistribution set contains the event-free set: every person with \(T_i\ge t\) is included in both, while some additional people may meet the prior-competing-event condition. The sets are equal at a given time if no individual has had a competing event before that time.
Worked Example: A Cause-Specific Set Versus a Subdistribution Set
In a second hypothetical cohort, consider time \(t=5\) years and focal cause 1. The six event histories are: A has cause 1 at year 3; B has cause 2 at year 2; C has cause 1 at year 5; D has cause 2 at year 5; E has cause 1 at year 8; and F has cause 2 at year 9. Membership is assessed immediately before year 5.
A experienced the focal event before \(t\), so A is in neither set. B had a competing event before \(t\), so B is in the subdistribution set but not the event-free set. C and D both have \(T_i=t\), so each is included in both sets immediately before \(t\). E and F have \(T_i>t\), so each is also in both sets.
Thus the event-free set is \(\{C,D,E,F\}\), with size \(R(5)=4\). The cause-1 subdistribution set is \(\{B,C,D,E,F\}\), with size \(R_1^{*}(5)=5\). In particular, D's cause-2 event at year 5 does not make D a prior-competing-event addition: D is already included through \(T_D\ge5\). This boundary distinction prevents a common off-by-one error in hand-built risk sets.
Tracking Membership Over Time
A practical way to avoid classification errors is to follow the membership status as time advances. Before any first event, an individual is in both sets. At a focal event, the individual leaves both sets for subsequent times. At a competing event, the individual leaves the event-free set but remains in the subdistribution set for the focal cause. These statements describe status after the event time; immediately before the event time, the individual is still included in both sets.
Worked Example: Updating Risk-Set Sizes After Events
Suppose a hypothetical group of five individuals has focal cause 1 and competing cause 2. Their first events occur as follows: A has cause 2 at year 2; B has cause 1 at year 3; C has cause 2 at year 4; D has cause 1 at year 6; and E has cause 2 at year 8. There is no censoring before year 8. We count sets immediately before years 2, 3, 4, and 5.
Immediately before year 2, all five individuals are event-free, so \(R(2)=5\) and \(R_1^{*}(2)=5\). Immediately before year 3, A's competing event is in the past; B, C, D, and E remain event-free. Therefore \(R(3)=4\), while A is retained in addition to those four in the cause-1 subdistribution set, giving \(R_1^{*}(3)=5\). B's cause-1 event occurs at year 3, so B is still counted immediately before that time.
Immediately before year 4, B's focal event is now in the past and B is excluded from both sets. A remains in the subdistribution set; C, D, and E are still event-free. Thus \(R(4)=3\) and \(R_1^{*}(4)=4\). Immediately before year 5, C's competing event is also in the past, so C is retained in the subdistribution set as well: \(R(5)=2\) for the event-free set \(\{D,E\}\), and \(R_1^{*}(5)=4\) for \(\{A,C,D,E\}\). The counts follow by updating membership, not by treating a competing event as if it were a focal event.
Assumptions, Diagnostics, and Limits
The definitions above use a first-event time \(T_i\) and a cause label \(J_i\) for each individual. They assume that the event of interest is the first event in the competing-risks setup, that event times are recorded on a common time scale, and that each observed first event has a usable cause classification. Ties at the same time can occur; the membership rules still apply immediately before that time because \(T_i\ge t\) includes all individuals whose first event is at \(t\).
With right censoring, a person whose event is not observed by the censoring time cannot simply be assigned a known first-event time and cause. The definitions describe the underlying risk sets when first-event histories are known; analysis of censored data must account for censoring when constructing estimates. Do not treat censoring as a competing event or silently apply the complete-history membership rule as if every censored individual's later event were known.
Several checks help diagnose a faulty risk-set construction:
- Check the strict inequality for past events. A competing event contributes the added membership only when \(T_i<t\), not when \(T_i=t\).
- Check the focal cause label. A prior cause-\(k\) event excludes the person; a prior event of another cause is retained in this modified set.
- Check set containment. Under the stated definitions, the event-free set must be a subset of the subdistribution set for the same focal cause and time. Therefore \(R_k^{*}(t)\ge R(t)\).
- Check that counts do not exceed the cohort size. The two disjoint components of subdistribution membership cannot be added as overlapping groups.
- Check the time convention. State whether membership is assessed immediately before an event time. Mixing pre-event and post-event conventions produces incorrect counts at event times.
The event-free set is the appropriate membership set for a cause-specific hazard. The subdistribution set is the modified membership set associated with a subdistribution hazard. They answer different modeling needs and should not be substituted for one another. This tutorial defines who is included; it does not interpret the subdistribution denominator as a conditional probability or treat the hazard itself as an event probability.
Check Your Understanding
Answer each question using membership immediately before the stated time. Complete solutions follow the questions.
- For focal cause 1 at \(t=6\), an individual had cause 2 at year 4. Which set or sets include this person?
- For focal cause 1 at \(t=6\), an individual has cause 1 at year 6. Is the person included immediately before year 6?
- At \(t=10\), an individual had cause 1 at year 7. Is the person included in either set?
- In a cohort, \(R(8)=12\), and three individuals had competing events strictly before year 8 with no other history that would exclude them from the subdistribution set. What is \(R_k^{*}(8)\)?
- State one reason a censored individual cannot automatically be classified as having had a prior competing event.
Solutions. 1. The person is excluded from the event-free set because the event occurred before 6, and included in the cause-1 subdistribution set because the prior event was a competing cause. 2. Yes. Since \(T_i=6\), the person satisfies \(T_i\ge6\) and is included in both sets immediately before year 6. 3. No. The prior event is the focal cause, so the person is excluded from both sets. 4. The event-free set is included within the subdistribution set, and the three prior competing-event individuals are additions, so \(R_k^{*}(8)=12+3=15\). 5. Censoring means the first event time and cause may not have been observed; without that information, the person cannot be labeled as having had a prior competing event.