Tutorials › Econometrics (Graduate) › Kaplan-Meier Calculations With Tied Events

Duration and Survival Models · Tutorial 572 of 952

Kaplan-Meier Calculations With Tied Events

Calculate Kaplan–Meier survival estimates from tied event and censoring times by tracking the risk set and applying the product-limit update at each event time.

Advanced 10 min read

What You'll Learn

  • Define the Kaplan–Meier risk set immediately before each event time
  • Apply the product-limit update when multiple events occur at the same time
  • Account for individuals censored at an event time under the stated tie convention
  • Update risk sets after both events and censoring
  • Read survival estimates and the median from a calculated Kaplan–Meier curve

Why Tied Event Times Need Careful Risk Sets

In duration data, some individuals experience the event of interest while others are right-censored: their event time is not observed, but they are known to have remained event-free until their censoring time. The Kaplan–Meier estimator combines this partial information into an estimated survival curve. When several events occur at the same recorded time, the estimator treats them together in one update. Getting that update right depends on counting the individuals who were still at risk immediately before that time.

Ties are common when time is recorded in whole days, months, or years, or when event times genuinely coincide. The calculation is not to order tied events arbitrarily and process them one at a time. Instead, count all tied events at that time, use the risk set just before the time, and make a single product-limit update.

Definition and Calculation Rule

Definition: Let \(T_i\) be the event time for individual \(i\), and let \(C_i\) be the right-censoring time. The observed time is \(Y_i=\min(T_i,C_i)\), and the event indicator is \(\delta_i=1\) if the event is observed and \(\delta_i=0\) if the individual is censored. At an event time \(t_j\), the risk set consists of individuals whose observed times are at least \(t_j\); its size is \(n_j\). Let \(d_j\) be the number of observed events at \(t_j\). The Kaplan–Meier estimate of survival after that event time is the previous estimate multiplied by \(1-d_j/n_j\).

Use the standard exact-time convention that an individual censored at \(t_j\) is included in the risk set immediately before \(t_j\), but is not counted among the \(d_j\) events. After the update, remove both the individuals with events at that time and those censored there from later risk sets. This convention treats an event at the recorded time as occurring before a censoring recorded at that same time.

$$ \widehat{S}(t)=\prod_{t_j\leq t}\left(1-\frac{d_j}{n_j}\right) $$

The product includes event times no later than \(t\). The estimate starts at \(\widehat{S}(0)=1\), stays constant between event times, and drops at an event time whenever \(d_j>0\). Censoring by itself does not produce a drop; it reduces the risk set used for later event updates.

The calculation estimates the probability of remaining event-free beyond a specified time, for the population represented by the cohort. Its usual interpretation requires right censoring to be noninformative for the event time, conditional on the information used to define the analysis: in particular, censoring should not selectively remove individuals with different unobserved event prospects. Individuals are also treated as independent observations for this basic calculation. These assumptions do not turn an observational survival estimate into a causal effect.

Why the Product-Limit Update Works

At an event time \(t_j\), \(n_j\) individuals are at risk immediately beforehand, and \(d_j\) of them experience the event. The observed fraction still event-free through that time is therefore \((n_j-d_j)/n_j=1-d_j/n_j\). Survival through a later time requires surviving each earlier event time as well, so these conditional fractions are multiplied.

$$ \widehat{S}(t_j) =\widehat{S}(t_j^-)\frac{n_j-d_j}{n_j} =\widehat{S}(t_j^-)\left(1-\frac{d_j}{n_j}\right) $$

Here \(\widehat{S}(t_j^-)\) is the estimate just before \(t_j\). If there are tied events, all \(d_j\) events are counted in the same fraction. An individual censored at \(t_j\) contributes to \(n_j\) under the stated convention, but not to \(d_j\), and contributes nothing to later risk sets.

Worked Example: Tied Events in an Eleven-Person Cohort

Suppose a hypothetical cohort is followed for time to a defined event, measured in months. “Event” means the event was observed; “Censored” means the individual was known to be event-free through the listed time, but the event time was not observed. The table gives observed times and status.

IndividualObserved time (months)Status
11Event
23Event
33Event
44Event
55Censored
66Event
76Censored
87Event
98Censored
109Event
1110Censored

At month 1, all 11 individuals are at risk and one event occurs. Thus \(\widehat{S}(1)=(11-1)/11=10/11\), or about 0.9091.

At month 3, individuals 2–11 are at risk: individuals 2 and 3 experience events at month 3, and individuals 4–11 have later observed times. Therefore \(n_j=10\) and \(d_j=2\). The update is

$$ \widehat{S}(3)=\frac{10}{11}\left(1-\frac{2}{10}\right) =\frac{10}{11}\cdot\frac{8}{10} =\frac{8}{11}\approx 0.7273 $$

At month 4, the eight individuals 4–11 remain at risk and individual 4 has an event. Hence \(n_j=8\), \(d_j=1\), and \(\widehat{S}(4)=(8/11)(7/8)=7/11\approx0.6364\). Individual 5 is censored at month 5. That censoring causes no survival drop, but removes individual 5 from subsequent risk sets.

At month 6, individuals 6–11 are at risk, so \(n_j=6\). One event and one censoring occur at that time: \(d_j=1\), with individual 7 included in the risk set before the update under the stated convention. Thus

$$ \widehat{S}(6)=\frac{7}{11}\left(1-\frac{1}{6}\right) =\frac{7}{11}\cdot\frac{5}{6} =\frac{35}{66}\approx0.5303 $$

At month 7, individuals 8–11 are at risk and individual 8 has an event: \(\widehat{S}(7)=(35/66)(3/4)=35/88\approx0.3977\). Individual 9 is censored at month 8, so the estimate remains unchanged at month 8. At month 9, individuals 10 and 11 are at risk and individual 10 has an event:

$$ \widehat{S}(9)=\frac{35}{88}\left(1-\frac{1}{2}\right) =\frac{35}{176}\approx0.1989 $$

Individual 11 is censored at month 10, so there is no further drop. Under the noninformative-censoring assumption, the estimate at month 9 is about 0.199: an estimated 19.9% of the represented population remains event-free beyond that time.

Keeping Tied Events and Censoring Straight

A reliable calculation separates three operations: identify each distinct event time, count the risk set just before it, and count the events among those at risk. Censoring times matter because they determine which individuals remain available for later risk sets. They are not event-time drops in the survival curve.

1
List distinct event times.
Group all observed events at the same recorded time; do not create a separate update for each individual event in a tie.
2
Count the risk set and tied events.
Count everyone with observed time at least \(t_j\), including censorings at \(t_j\) under the stated convention. Count only observed events at \(t_j\) in \(d_j\).
3
Update survival and then the next risk set.
Multiply the prior estimate by \(1-d_j/n_j\). Remove events and censorings at that time before counting the risk set at a later time.

Worked Example: A Censoring Time Tied With an Event

Consider a second hypothetical cohort with seven individuals. Their observed times and statuses are: A, 2 months, event; B, 2 months, censored; C, 4 months, event; D, 4 months, event; E, 5 months, censored; F, 7 months, event; and G, 8 months, censored.

At month 2, all seven are at risk. There is one event, so \(n_j=7\), \(d_j=1\), and \(\widehat{S}(2)=1(1-1/7)=6/7\approx0.8571\). B’s censoring at month 2 is included in the risk set for this update, then B is removed along with A from later risk sets.

At month 4, the five individuals C–G are at risk and C and D experience tied events. The estimate becomes

$$ \widehat{S}(4)=\frac{6}{7}\left(1-\frac{2}{5}\right) =\frac{6}{7}\cdot\frac{3}{5} =\frac{18}{35}\approx0.5143 $$

E is censored at month 5, with no immediate change in survival. At month 7, F and G are at risk and F has an event, giving \(\widehat{S}(7)=(18/35)(1-1/2)=9/35\approx0.2571\). G’s censoring at month 8 does not change the estimate. Notice that failing to include B in the month-2 risk set would incorrectly change the event fraction and every later survival estimate.

Worked Example: Reading the Median From a Kaplan–Meier Estimate

Suppose a third hypothetical cohort has eight individuals with observed records: (1 month, event), (2 months, event), (2 months, censored), (4 months, event), (4 months, event), (5 months, censored), (6 months, event), and (7 months, censored).

At month 1, \(n_j=8\), \(d_j=1\), so survival is \(7/8=0.875\). At month 2, seven individuals are at risk, one event occurs, and the censoring at month 2 is included in the risk set: the updated estimate is \((7/8)(6/7)=3/4=0.75\). The event and censoring are then both removed from future risk sets.

At month 4, the five remaining individuals are at risk and two events are tied. Therefore

$$ \widehat{S}(4)=\frac{3}{4}\left(1-\frac{2}{5}\right) =\frac{3}{4}\cdot\frac{3}{5} =\frac{9}{20}=0.45 $$

The estimate first falls to 0.5 or below at month 4. The Kaplan–Meier median is therefore 4 months: it is the earliest time at which the estimated survival function is no greater than one-half. The censoring at month 5 has no effect on that conclusion. The later event at month 6 is among the two remaining individuals at risk, so the estimate then becomes \(0.45(1-1/2)=0.225\).

Common Mistakes and Practical Checks

  • Miscounting the risk set. The risk set at \(t_j\) is counted immediately before the event update. In the eleven-person example, at month 3 individuals 2–11 are at risk: two have events at month 3 and eight have later observed times.
  • Processing tied events sequentially. Do not remove one tied event before calculating the fraction for another event at the same time. Use one risk-set size \(n_j\) and the total tied-event count \(d_j\).
  • Dropping survival at censoring. Censoring is not an observed event. It leaves the current estimate unchanged but reduces the number at risk at later times.
  • Excluding a censoring tied with an event from the risk set without stating a different timing rule. Under the convention used here, such a person is included just before the time, and removed after the update.
  • Interpreting the curve as a causal effect. A Kaplan–Meier estimate describes survival in the population represented under its censoring assumptions. It does not, by itself, establish what an intervention would cause.

A useful arithmetic check is that each event-time factor \(1-d_j/n_j\) lies between zero and one, so the estimated survival cannot increase. Also verify that \(d_j\leq n_j\), and that a subject censored or experiencing an event is not counted in any later risk set. A zero factor occurs if every individual at risk has the event at that time; the estimated survival is then zero thereafter.

Key takeaway: For tied Kaplan–Meier calculations, count everyone at risk immediately before the tied time, use the total number of events at that time in one product-limit update, and remove both events and censorings from later risk sets.

Check Your Understanding

Use the exact-time convention stated in this tutorial.

  1. At an event time, \(n_j=12\) and \(d_j=3\). If the previous survival estimate is 0.80, calculate the updated estimate.
  2. Four individuals have observed time 5: two events and two censorings. How are these four individuals counted in the risk set and event count at time 5?
  3. Why does a censoring at time 6 not itself lower the Kaplan–Meier estimate at time 6? How can it still affect later estimates?
  4. An estimated survival curve is 0.62 just before month 8. At month 8, five are at risk and two have tied events. Calculate the new estimate.
  5. What is the Kaplan–Meier median, if it exists, and how is it identified from the estimated curve?
Clinical Biostats