Why Risk Sets Need Careful Construction
Survival analyses compare event occurrence among individuals who could still experience the event at each time. The comparison depends on the risk set: who is included in the denominator when events are counted. A censored individual contributes information while under observation, but their event time is unknown after follow-up ends. Counting censoring as an event, or removing a person before censoring occurs, changes the data being analyzed and can distort estimated survival.
Delayed entry creates a second boundary. A person who joins observation after the time origin was not observed to be at risk before entry. Including that person in earlier risk sets falsely treats unobserved time as observed follow-up. These errors are avoidable once event status, observed follow-up, and entry time are represented explicitly.
What the Risk Set Represents
At an event time \(t\), \(R(t)\) contains individuals who have entered observation and have not had an event or been censored before \(t\). In a cohort with no delayed entry, this means \(Y_i\geq t\). Someone censored after \(t\) belongs in the risk set at \(t\), even though their event will never be observed. Someone censored before \(t\) does not belong in it.
Write \(d(t)=\sum_i I(Y_i=t,\delta_i=1)\) for the number of observed events at \(t\), and \(n(t)=|R(t)|\) for the risk-set size. In the Kaplan–Meier estimator, an event time contributes the factor \(1-d(t)/n(t)\). A censoring time by itself contributes no event factor: the censored individual leaves subsequent risk sets, but does not count as an event. For event and censoring times recorded as tied, the analysis needs a stated tie convention. A common convention includes individuals censored at \(t\) in the risk set for events at \(t\), treating the events as occurring just before censoring.
These definitions do not, on their own, ensure valid inference. Standard Kaplan–Meier and Cox risk-set analyses require censoring to be noninformative for the event process, at least conditional on the covariates used in the analysis. Informally, after conditioning as required, those censored at a given time should not have systematically different unobserved future event experience from those remaining under observation. Delayed-entry analysis additionally requires an appropriate independent-truncation assumption: entry should not selectively depend on unobserved event times in a way that distorts the observed risk sets.
Why Censoring Is Not an Event
The observed data distinguish two outcomes at the end of follow-up: an event was observed, or observation ended before the event was observed. Under independent right censoring, the event-time part of an individual's likelihood contribution is proportional to
where \(f_T\) is the event-time density and \(S_T(y)=P(T_i>y)\) is the event-free survival probability. If \(\delta_i=1\), the observed event contributes a density at \(Y_i\). If \(\delta_i=0\), the information is that the event time exceeds \(Y_i\), contributing survival through \(Y_i\), not an event at \(Y_i\). With a continuous event-time distribution, \(P(T_i=Y_i)=0\) for any specified time; coding censoring as an event therefore asserts information the observation does not provide.
There is a related timing error: a censored person remains in the risk set until their censoring time. Their follow-up establishes that they remained event-free up to that time. Removing them at the study's beginning discards this valid information, while keeping them in risk sets after censoring treats them as observed longer than they were.
Worked Example: Censored Individuals Leave at Their Censoring Times
Consider six hypothetical participants, all entering at time 0. Their observed times and statuses are: A has an event at 2; B is censored at 3; C has an event at 4; D has an event at 4.5; E is censored at 5; and F has an event at 6. There are no ties.
At time 2, all six have entered and have observed follow-up through time 2, so \(R(2)=\{A,B,C,D,E,F\}\), with \(n(2)=6\) and \(d(2)=1\). At time 4, A has had an event and B was censored at 3, so \(R(4)=\{C,D,E,F\}\), with \(n(4)=4\) and \(d(4)=1\). At time 4.5, \(R(4.5)=\{D,E,F\}\); E remains included because censoring at 5 is later than 4.5. At time 6, only F remains at risk.
For example, the Kaplan–Meier estimate just after time 4 is \( \hat S(4)=(1-1/6)(1-1/4)=5/8=0.625 \). This is a hypothetical estimated event-free proportion of 0.625 just after time 4, under the assumptions of the estimator. The calculation includes B in the risk set at time 2, because B was known to be event-free through time 2, and excludes B at time 4, because follow-up ended at time 3.
Worked Example: The Effect of Treating Censoring as an Event
Use the same hypothetical data. B is censored at time 3, when no event occurs. The correct estimate through time 4 remains \( \hat S(4)=(1-1/6)(1-1/4)=5/8=0.625 \). There is no Kaplan–Meier event factor at time 3.
Suppose instead that B's censoring is incorrectly coded as an event. Immediately before time 3, the risk set contains B, C, D, E, and F, so the incorrect event factor is \(1-1/5=4/5\). At time 4, the risk set still contains C, D, E, and F, and C's event gives a factor of \(1-1/4=3/4\). Including the genuine event at time 2, the erroneous calculation is \( (1-1/6)(1-1/5)(1-1/4)=(5/6)(4/5)(3/4)=1/2 \).
The incorrect estimate, 0.500, is below the correct 0.625 because it adds an event that was never observed. This is not a harmless relabeling: it adds a false event to the numerator of the event count and creates a false downward step in estimated survival.
Delayed Entry: Include People Only After They Enter
In delayed-entry (left-truncated) data, follow-up begins after the time origin for some individuals. If \(A_i\) is entry time, the risk-set indicator at \(t\) is \(I(A_i<t)I(Y_i\geq t)\). The first part prevents counting a person before observation begins; the second prevents counting them after an event or censoring. Risk sets therefore depend on both the entry boundary and the end of observed follow-up.
Worked Example: Correcting Risk Sets for Delayed Entry
Suppose five hypothetical participants have the following entry times and outcomes, all measured on the same time scale: A enters at 0 and has an event at 2; B enters at 1 and is censored at 4; C enters at 3 and has an event at 5; D enters at 0 and is censored at 8; E enters at 4 and has an event at 7.
At event time 2, only A, B, and D have entered and remain under observation. Thus \(R(2)=\{A,B,D\}\), \(n(2)=3\), and \(d(2)=1\). C and E cannot be included: their entry times are later than 2. At time 5, C, D, and E have entered and are still under observation; A has had an event and B was censored at 4. Thus \(R(5)=\{C,D,E\}\), with \(n(5)=3\) and \(d(5)=1\).
The Kaplan–Meier estimate through time 5, using these event times, is \( \hat S(5)=(1-1/3)(1-1/3)=4/9\approx0.444 \). If C and E were incorrectly counted from time 0, the risk set at time 2 would have five people rather than three. The time-2 factor would then be \(1-1/5=4/5\), falsely crediting C and E with observed event-free time before they entered. The resulting estimate through time 5 would be \((4/5)(2/3)=8/15\approx0.533\), rather than \(4/9\). This comparison shows how risk-set errors change the estimate; it does not establish that either estimate is valid without the relevant censoring and entry assumptions.
Checks, Alternatives, and Limits
A practical check is to reconstruct each risk set from the individual records rather than infer membership from a single final status column. At every event time, verify that each included person entered before that time and had not experienced an event or censoring earlier. Confirm that every event counted in \(d(t)\) belongs to \(R(t)\). A risk-set size should not increase over time in an ordinary cohort with no delayed entry; with delayed entry it can increase when new individuals enter, but its changes should match recorded entries, events, and censoring.
A compact audit table can list, at each event time, the risk-set members, \(n(t)\), and \(d(t)\). Compare these counts with the study's follow-up records and check the time origin and units. Unexpected events at a censoring time, people counted after loss to follow-up, or people included before their entry time indicate a coding or convention problem. With rounded dates or ties, inspect whether event and censoring order is known rather than relying silently on software defaults.
The main alternatives address different data structures or assumptions; they do not make an incorrect risk set acceptable. Kaplan–Meier estimation is a nonparametric approach for right-censored event times when its assumptions are suitable. A Cox model uses risk sets to compare covariate-weighted event rates, but it also requires correct entry and censoring information. Parametric survival models specify an event-time distribution and may handle censoring through the likelihood, yet censored observations still contribute survival through their observed times rather than false events. When censoring depends on measured predictors, modeling or weighting approaches may be needed; when censoring remains informative after conditioning, standard methods can be biased. Competing events also require care: whether another event can be treated as censoring depends on the estimand, so it should not automatically be treated as ordinary independent censoring.
For delayed entry, the analysis also depends on the time origin and the mechanism determining when people become observable. If entry depends on a person's unobserved event time, simply adding an entry-time condition to the risk set does not necessarily remove selection bias. Risk-set construction handles who was observed and at risk; it cannot repair an unsuitable time origin, informative entry, or informative loss to follow-up.
Check Your Understanding
Answer each question, then compare your reasoning with the solutions below.
- A participant enters at time 0 and is censored at time 6. Should this participant be included in the risk set at an event time of 4? At an event time of 7?
- At time 5, an event is observed. Three participants entered before time 5 and have observed times at or after 5; one other participant was censored at time 3. What is the risk-set size?
- A participant enters at time 4 and has an event at time 8. Should they be included in the risk set at time 3? At time 8?
- In one sentence, explain why coding a censoring time as an event changes a Kaplan–Meier estimate.
- What additional assumption about entry is needed for standard delayed-entry risk-set analysis to be appropriate?
Solutions. (1) Yes at time 4, because follow-up continues through 6; no at time 7, because censoring occurred at 6. (2) The risk-set size is 3. The censored participant's follow-up ended before time 5, so that participant is excluded. (3) No at time 3, because entry has not occurred; yes at time 8 under the stated convention, because the participant entered before 8 and had an event at 8. (4) It adds a false event and therefore an unwarranted downward survival step. (5) Entry must be independent of the unobserved event time in an appropriate sense, or the analysis must otherwise account for selection into observation.