Tutorials › Multiple Imputation by Chained Equations (MICE) › Risk Sets and Their Role in Survival Imputation

Survival and Time-Varying Data · Tutorial 384 of 497

Risk Sets and Their Role in Survival Imputation

Learn to determine exactly who is at risk immediately before each observed event, including when participants enter late or share event and censoring times.

Advanced 10 min read

What You'll Learn

  • Define the event-time risk set using entry time and observed follow-up endpoint
  • Apply the strict-entry and inclusive-endpoint boundary conventions
  • Distinguish risk-set membership from having an event at that time
  • Calculate risk sets and event counts when event times are tied
  • Diagnose errors caused by ignoring delayed entry or censoring status
  • Explain how risk-set information can contribute to survival-aware imputation

Why Risk Sets Matter

A survival record describes not only whether an event was observed, but also when each participant could have experienced it. At a particular event time, some participants have not yet entered observation, while others have already experienced the event or been censored. The risk set is the group who are under observation and still event-free immediately before that time. Constructing it correctly is essential when survival information is used to describe event occurrence or to inform imputation of incomplete covariates.

The key boundary distinction is that a participant who exits at time \(t\) is counted as at risk immediately before \(t\), while a participant entering exactly at \(t\) is not. This convention reflects the risk set just before an event time, rather than the group observed at some unspecified instant during that time.

Definition and Boundary Convention

For participant \(i\), let \(A_i\) be the time they enter observation, \(Y_i\) their observed follow-up endpoint, and \(\Delta_i\) their event indicator. Thus \(\Delta_i=1\) means the event was observed at \(Y_i\), and \(\Delta_i=0\) means follow-up ended at \(Y_i\) without an observed event. The endpoint can result from the event or from censoring. These are the event and censoring records described in the earlier material on Event Times, Censoring Times, and Observed Follow-Up.

Definition: Under the usual delayed-entry convention, the risk set immediately before time \(t\) is $$ R(t)=\{i:A_i<t\leq Y_i\}. $$ A participant is included if they entered strictly before \(t\) and their observed follow-up reaches at least \(t\). The event count at \(t\) is \(d(t)=\sum_i I(Y_i=t,\Delta_i=1)\). Only participants with \(\Delta_i=1\) and \(Y_i=t\) have an observed event at \(t\); other members of \(R(t)\) remain at risk through that instant or leave follow-up without an event.

The strict inequality \(A_i<t\) means a person entering exactly at \(t\) is not counted as at risk just before \(t\). The inclusive inequality \(t\leq Y_i\) means a person whose observed endpoint is exactly \(t\) is counted just before that endpoint. If the endpoint is a censoring time, this person contributes to the risk set at \(t\), but not to the event count. If the endpoint is an observed event time, the person contributes to both the risk set and the event count.

This is a bookkeeping definition; it does not, by itself, require a statistical assumption. For inferential uses, however, censoring and entry mechanisms matter. A common requirement is that censoring and selection into observation be independent of the event process, conditional on variables included in the analysis. If participants enter observation because of their unobserved future event risk, the observed risk sets may not represent the target population’s risk experience. The risk set can still be calculated from the records, but its interpretation for population inference may be compromised.

Deriving Membership From the Follow-Up Record

The definition follows by translating “under observation and event-free immediately before \(t\)” into two conditions. First, a participant must already have entered observation: \(A_i<t\). Second, the observed follow-up must not have ended before \(t\): \(Y_i\geq t\). Combining these conditions gives the indicator form below.

$$ I\{i\in R(t)\}=I(A_i<t)\,I(Y_i\geq t) $$

At an event time, the risk set is determined from all records using this rule, not just the records of people who experienced an event. Once the set is formed, the event count is obtained by counting the members whose endpoint equals \(t\) and whose event indicator is one. This separation prevents a frequent error: treating everyone in the risk set as an event, or removing an observed event from the risk set before counting it.

Worked Example: Entry, Events, and Censoring at Two Times

Suppose five hypothetical participants have the following records. Each entry and endpoint is measured in years from the study’s time origin.

ParticipantEntry \(A_i\)Endpoint \(Y_i\)Endpoint status
F04Event
G25Censored
H35Event
J16Censored
K47Event

At \(t=4\), apply \(A_i<4\leq Y_i\) to each record. F satisfies \(0<4\leq4\); G satisfies \(2<4\leq5\); H satisfies \(3<4\leq5\); and J satisfies \(1<4\leq6\). K entered at 4, so it does not satisfy the strict entry condition. Therefore \(R(4)=\{F,G,H,J\}\). There is one event at time 4, for F. H is in the risk set at 4 but remains under observation then; H’s event occurs at time 5.

At \(t=5\), F has already left follow-up because \(Y_F=4\). G, H, J, and K satisfy the two membership conditions: their entry times are all less than 5 and their endpoints are at least 5. Thus \(R(5)=\{G,H,J,K\}\). Only H has an observed event at 5, so \(d(5)=1\). G is included at 5 because its censoring endpoint is 5, but it contributes no event.

This example shows why the risk set is not simply “everyone who eventually has an event.” J and G are included despite being censored, and H is in the risk set at 4 even though H’s event occurs later.

Tied Times and Delayed Entry

Several participants can have the same observed event time. In that case, all participants who meet the entry and endpoint conditions belong to the risk set at that time, and each observed event at that time contributes to \(d(t)\). A censoring endpoint tied to an event time is also included under the stated convention. Exact ties between entry and event times need particular care: the strict-entry rule excludes the new entrant from the risk set immediately before that time. If a data system uses a different ordering convention, the analysis must state and consistently apply it.

Worked Example: Counting Tied Events

Consider the following hypothetical follow-up records, with times measured in months.

ParticipantEntry \(A_i\)Endpoint \(Y_i\)Endpoint status
A03Event
B13Event
C03Censored
D35Event
E24Censored

At \(t=3\), A satisfies \(0<3\leq3\), B satisfies \(1<3\leq3\), C satisfies \(0<3\leq3\), and E satisfies \(2<3\leq4\). D entered at 3, so \(3<3\) is false and D is excluded. Therefore \(R(3)=\{A,B,C,E\}\), and its size is 4. The observed event count is \(d(3)=2\), because A and B have event endpoints at 3. C is included but censored at 3; E is included and continues beyond 3.

The calculation distinguishes two quantities: the risk-set size is 4, while the number of events is 2. Neither the censoring status of C nor the tied entry time of D should be ignored when calculating those quantities.

Risk Sets in Survival Imputation

In MICE, survival information can be useful when imputing a covariate whose missingness or distribution is associated with prognosis. A participant’s event indicator and follow-up information can inform the conditional imputation model. Risk-set membership makes the time-specific structure explicit: it indicates which participants were observable and event-free at each event time. It is built from entry, endpoint, and status records, so missingness in a covariate does not itself remove someone from the risk set.

This does not mean that a separate binary indicator for every event time is automatically a good imputation model. There may be many event times, and a long set of indicators can be redundant or unstable. The purpose here is to establish the correct underlying membership. How to summarize survival information for use as an imputation predictor is a distinct modeling decision; it must preserve relevant associations without treating an arbitrary risk-set encoding as a complete model.

Worked Example: Avoiding an Endpoint-Only Risk Set

Suppose five hypothetical participants have these records (times in weeks): P enters at 0 and has an event at 6; Q enters at 4 and is censored at 8; R enters at 0 and has an event at 5; S enters at 6 and has an event at 9; and T enters at 2 and is censored at 6. Consider the risk set just before \(t=6\).

P satisfies \(0<6\leq6\), Q satisfies \(4<6\leq8\), and T satisfies \(2<6\leq6\). R has endpoint 5, so is no longer under observation at 6. S has endpoint beyond 6, but entered exactly at 6, so is not in the risk set immediately before 6. Consequently \(R(6)=\{P,Q,T\}\). Only P has an observed event at 6, giving \(d(6)=1\); T is included because the censoring endpoint is 6.

An endpoint-only rule \(Y_i\geq6\) would incorrectly add S. It would also fail to make explicit why R is excluded: R’s endpoint is before 6. Checking both entry and endpoint conditions yields the correct set.

Diagnostics, Alternatives, and Limitations

Risk-set calculations are deterministic given correctly recorded entry, endpoint, and event-status fields. Before using them in an analysis or imputation model, check that the records make sense and that the boundary convention matches the data structure.

  • Check ordering: each endpoint should be no earlier than entry. Investigate records with \(Y_i<A_i\) rather than silently forcing them into a risk set.
  • Check event membership: every observed event at \(t\) should have \(A_i<t\leq Y_i\), and should be counted in \(d(t)\).
  • Check endpoint status: a censored participant with \(Y_i=t\) belongs to \(R(t)\) but not to \(d(t)\).
  • Check delayed entry: a participant entering at \(t\) is excluded from \(R(t)\) under the just-before convention, even if their endpoint is later.
  • Check ties and time scales: rounding or inconsistent time origins can create apparent ties or ordering problems. Use the recorded time scale and a documented rule for exact ties.

A tempting alternative is to define the risk set using only \(Y_i\geq t\). That works only when everyone entered before every event time of interest; with delayed entry it can include people who were not yet observed. Another tempting shortcut is to use only event participants. That discards censored participants who were still at risk and therefore confuses the risk set with the event count. Follow-up duration and event status remain useful summaries, but they do not replace the time-specific membership rule when entry times vary.

Even a correctly constructed risk set cannot correct informative censoring, selection into observation, measurement errors in time, or an unsuitable imputation model. It describes who was observed and event-free immediately before a given time; it does not prove that those participants represent a broader target population. For imputation, survival information should be included in a way compatible with the substantive analysis and the missingness structure. A correct risk-set calculation is necessary for time-specific reasoning, but is not by itself a guarantee of valid imputation.

Common Mistake

Common mistake: “Everyone in the risk set at \(t\) experienced the event at \(t\), and anyone whose follow-up ends at \(t\) should be removed before constructing the set.” Both claims are wrong under the just-before convention. A risk set includes all participants with \(A_i<t\leq Y_i\), whether they have an event, are censored at \(t\), or continue beyond \(t\). The event count is separately calculated using \(Y_i=t\) and \(\Delta_i=1\).

For instance, at time 4 in the first example, F and H are both members of the risk set, but only F has an event at that time. H’s endpoint is 5, so H remains under observation at 4 and experiences the event at 5. Keeping membership and event status separate prevents the two quantities from being conflated.

Check Your Understanding

Use the convention \(i\in R(t)\) exactly when \(A_i<t\leq Y_i\). Solutions are included after the questions.

  1. A participant enters at month 2 and is censored at month 7. Are they in \(R(2)\), \(R(7)\), or both?
  2. At time 5, three people have records: U enters at 0 and has an event at 5; V enters at 1 and is censored at 5; W enters at 5 and has an event at 8. List \(R(5)\) and give \(d(5)\).
  3. Why can a person be in \(R(t)\) without contributing to \(d(t)\)? Give two possible record patterns.
  4. At \(t=6\), a record has \(A_i=3\), \(Y_i=5\), and \(\Delta_i=1\). Is the participant in \(R(6)\)? Explain.

Solutions. (1) They are not in \(R(2)\), because entry must be strictly earlier than 2. They are in \(R(7)\), because \(2<7\leq7\). (2) U satisfies \(0<5\leq5\), V satisfies \(1<5\leq5\), and W is excluded because \(5<5\) is false. Thus \(R(5)=\{U,V\}\), and \(d(5)=1\), from U’s event. (3) A participant may be censored at \(t\), or may continue follow-up beyond \(t\); either is compatible with risk-set membership but not an event at \(t\). (4) No. Although entry was before 6, the endpoint 5 is less than 6, so the participant is no longer under observation at 6.

Clinical Biostats