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.
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.
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.
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:
Three Types of Censoring
Why Right Censoring Happens
The Survival Function \( S(t) \)
The survival function gives the probability that a subject survives beyond time \( t \):
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
How to Analyze Time-to-Event Data
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 |
|---|---|---|---|
| 1 | 2 | 1 | Event |
| 2 | 4 | 0 | Censored |
| 3 | 6 | 1 | Event |
| 4 | 9 | 0 | Censored |
| 5 | 10 | 1 | Event |
| 6 | 12 | 1 | Event |
Example 1: Kaplan-Meier Calculation
| Time \( t_j \) | Risk set \( n_j \) | Events \( d_j \) | \( 1 - d_j/n_j \) | \( \hat{S}(t_j) \) |
|---|---|---|---|---|
| 2 | 6 | 1 | \( 5/6 \) | 0.833 |
| 6 | 4 | 1 | \( 3/4 \) | 0.625 |
| 10 | 2 | 1 | \( 1/2 \) | 0.313 |
| 12 | 1 | 1 | \( 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:
Example 3: Impact of Ignoring Censoring
Using the same six patients, compare three approaches:
Common Mistakes to Avoid
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?