01 / 22

Time-to-Event Data
& Censoring

Learn how biostatisticians analyze how long until an event occurs, and why incomplete observations are not just okay: they are expected.

Biostatistics

What Is Time-to-Event Data?

In many studies, the key outcome is not whether something happens, but how long it takes to happen. We measure the duration from a defined starting point to a specific event.

Starting Point
Enrollment in a trial, diagnosis date, or birth
Event
Death, relapse, recovery, device failure, or discharge
Time
Duration measured in days, months, or years: \( T \geq 0 \)

Why Not Just Use Averages?

Imagine a 2-year cancer study. At the end, some patients are still alive. If we compute a simple average survival time, we would underestimate the true survival because we treat those still-alive patients as if they died at year 2.

0 6 mo 12 mo 18 mo 24 mo Patients A B C ? D ? E Event observed Censored (incomplete)

What Is Censoring?

Censoring occurs when the exact time of the event is unknown for some subjects. We know a partial fact about their survival time, but not the complete value.

For a censored observation, we record two pieces of information:

1
The observed time \( t_i \): how long we observed the subject before information became incomplete.
2
The event indicator \( \delta_i \): equals 1 if the event occurred, or 0 if censored.

Three Types of Censoring

Right Censoring
The event has not yet occurred by the time observation ends. We know \( T > t_i \). This is by far the most common type.
Left Censoring
The event already occurred before observation began. We know \( T < t_i \). Example: infection detected at first test, but started earlier.
Interval Censoring
The event occurred between two observation times. We know \( t_a < T < t_b \). Example: tumor found between two scheduled scans.

Why Right Censoring Happens

1
Study ends: The trial has a fixed end date, but some subjects have not yet experienced the event (administrative censoring).
2
Lost to follow-up: A patient moves away, switches doctors, or stops responding to the study team.
3
Competing event: A patient dies of an unrelated cause before the event of interest (e.g., car accident in a cancer trial).
4
Withdrawal: The participant voluntarily leaves the study for personal reasons.

The Survival Function \( S(t) \)

The survival function gives the probability that a subject survives beyond time \( t \):

At \( t = 0 \)
\( S(0) = 1 \): everyone starts alive
As \( t \to \infty \)
\( S(t) \to 0 \): eventually all experience the event
Always
\( S(t) \) is non-increasing: it can only stay flat or go down

The Hazard Function \( h(t) \)

While \( S(t) \) tells us the probability of surviving past \( t \), the hazard function captures the instantaneous risk of the event at time \( t \), given survival up to that point:

The hazard is not a probability: it is a rate (events per unit time). It can exceed 1. It connects to the survival function via:

Survival vs. Hazard: Key Distinction

Survival \( S(t) \) Hazard \( h(t) \)
Meaning Prob. of surviving beyond \( t \) Instantaneous risk at \( t \)
Range \( [0, 1] \) \( [0, \infty) \)
Direction Non-increasing (falls or flat) Can increase, decrease, or stay constant
At \( t = 0 \) \( S(0) = 1 \) Depends on distribution
Type Probability Rate (not a probability)

Visualizing a Survival Curve

0.0 0.25 0.50 0.75 1.00 0 6 12 18 24 Time (months)
\( S(t) \)
Survival estimate Censored observation

How to Analyze Time-to-Event Data

1
Define the event and origin. What counts as the "event"? When does the clock start?
2
Record \( (t_i, \delta_i) \) pairs. For each subject, note the observed time and whether the event occurred (\( \delta = 1 \)) or was censored (\( \delta = 0 \)).
3
Order the event times. Sort the distinct event times from smallest to largest.
4
Compute the risk set \( n_j \) at each event time: the number of subjects still being observed (event-free and uncensored) just before time \( t_j \).
5
Estimate \( S(t) \) using the Kaplan-Meier formula: $$ \hat{S}(t) = \prod_{t_j \leq t} \left(1 - \frac{d_j}{n_j}\right) $$ where \( d_j \) is the number of events at time \( t_j \).

Example 1: Small Dataset

Six patients in a clinical trial. Follow-up times (months): 2, 4+, 6, 9+, 10, 12. The "+" denotes censored observations.

Patient Time \( t_i \) Event \( \delta_i \) Status
121Event
240Censored
361Event
490Censored
5101Event
6121Event

Example 1: Kaplan-Meier Calculation

Time \( t_j \) Risk set \( n_j \) Events \( d_j \) \( 1 - d_j/n_j \) \( \hat{S}(t_j) \)
261\( 5/6 \)0.833
641\( 3/4 \)0.625
1021\( 1/2 \)0.313
1211\( 0 \)0.000

Example 2: Median Survival Time

The median survival time is the time \( t_m \) at which \( \hat{S}(t_m) = 0.50 \). Using our example:

0 0.25 0.50 0.75 1.00 0 2 4 6 8 10 12 0.50 Median = 10

Example 3: Impact of Ignoring Censoring

Using the same six patients, compare three approaches:

Naive Average
Treat censored as events: \( \bar{t} = (2+4+6+9+10+12)/6 = 7.2 \) months. Underestimates true survival.
Drop Censored
Use only events: \( \bar{t} = (2+6+10+12)/4 = 7.5 \) months. Wastes data and can also be biased.
Kaplan-Meier
Uses all data correctly. Median = 10 months. Censored subjects still contribute to earlier survival estimates.

Common Mistakes to Avoid

✕ Treating Censored as Events
Recording a censored time as if the event occurred leads to systematic underestimation of true survival.
✕ Excluding Censored Subjects
Dropping censored data reduces sample size and introduces selection bias: you keep only those who failed.
✕ Ignoring Informative Censoring
If sicker patients drop out more, censoring is informative and standard methods give biased results. Always check this assumption.

Summary of Key Concepts

Concept Definition Key Fact
Time-to-event Duration from origin to event \( T \geq 0 \), continuous
Censoring Incomplete observation of \( T \) Must be non-informative
\( S(t) \) \( P(T > t) \) Starts at 1, non-increasing
\( h(t) \) Instantaneous risk given survival A rate, not a probability
Kaplan-Meier Non-parametric \( \hat{S}(t) \) estimator Handles censoring correctly

Question 1 of 5

A patient enrolls in a 3-year cancer study and is still alive when the study ends. How should this patient's data be recorded?

Question 2 of 5

In the Kaplan-Meier estimator, what happens to the survival curve at a time when only censored observations occur (no events)?

Question 3 of 5

If 10 patients are at risk at time \( t_j \) and 2 events occur, what is the Kaplan-Meier estimate of the conditional probability of surviving past \( t_j \)?

Question 4 of 5

The hazard function \( h(t) \) represents:

Question 5 of 5

A patient tests positive for an infection at their first clinic visit, but the infection clearly started some time before. What type of censoring is this?