Time-to-event data and censoring

What a survival time is, why censoring happens, why ordinary methods fail, and the survival, hazard and cumulative hazard functions.

Three things define a survival time

Every time-to-event analysis starts by fixing three things, and a paper that does not state them clearly cannot be interpreted:

  • The time origin: when the clock starts. Diagnosis, surgery, randomisation, start of treatment. It should be a moment that is defined in the same way for every patient.
  • The event: what stops the clock. Death from any cause (overall survival), relapse or death (disease-free or progression-free survival), graft failure, hospital discharge.
  • The time scale and unit: days, months or years since the origin.

For each patient we then observe a pair \((t_i, \delta_i)\): the time \(t_i\) from the origin to the end of observation, and an indicator \(\delta_i\) that says whether observation ended because the event happened (\(\delta_i = 1\)) or for some other reason (\(\delta_i = 0\)). In the teaching dataset these are the columns time (months) and event (dead or alive).

Censoring

A patient whose observation ends before the event is censored. Their survival time is not missing: we know it is longer than \(t_i\). This is called right censoring, because the true time lies somewhere to the right of what we saw. It happens for ordinary reasons:

  • the study ends (administrative censoring): patients recruited late have been followed for a short time only;
  • loss to follow-up: the patient moves away or stops attending;
  • withdrawal, or an event that makes further observation impossible.

Figure 1: Eight hypothetical patients. Left: they enter a study at different dates and the study closes at month 15 (dashed line). Right: the same patients with each clock started at entry, which is how survival data are analysed. Dots are deaths; crosses are censored follow-up (patient 6 was lost to follow-up, the others were alive when the study closed).

The key assumption of every method in this tutorial is non-informative censoring: patients who are censored at a given time must have the same prospects as those who remain under observation. Administrative censoring is usually harmless. Loss to follow-up may not be: if the sickest patients stop coming to the clinic, the patients who remain look healthier than the cohort really is, and survival is overestimated. No statistical method can repair this. Keep loss to follow-up low and report how much there was.

Why the usual methods fail

Suppose you want the typical survival of the 226 patients. Some obvious shortcuts all give the wrong answer:

Approach Median (months)
Median of all observed times (censored treated as deaths) 8.6
Median time of the patients who died (censored dropped) 7.5
Kaplan-Meier median (next page) 10.2

Treating a censored time as if the patient had died underestimates survival: the patient lived longer. Dropping censored patients also underestimates it, because the patients still alive at the end of the study are often the long survivors. And the proportion who died, 163/226 = 72%, is not a probability of anything: it depends on how long each patient happened to be followed. A t-test or a linear regression of time has the same problems. Logistic regression of “dead at 12 months” works only for patients followed for at least 12 months and ignores when the deaths happened.

Survival methods use each patient for exactly as long as they were observed, and no longer.

Three ways to describe the same survival

The survival function \(S(t)\)

\[S(t) = P(T > t)\]

is the probability of being event-free beyond time \(t\). It starts at \(S(0) = 1\) and can only go down. “Two-year survival is 12 %” is a statement about \(S(24 \text{ months})\). The median survival is the time at which \(S(t)\) falls to 0.5. The Kaplan-Meier curve is an estimate of \(S(t)\).

The hazard \(h(t)\)

The hazard is the rate at which events happen at time \(t\) among the patients who are still event-free just before \(t\):

\[h(t) = \lim_{\Delta t \to 0} \frac{P(t \le T < t + \Delta t \mid T \ge t)}{\Delta t}\]

Think of it as the death rate of the patients still alive at that moment, for example “3% per month at month 6”. The hazard can rise, fall or stay constant over time, and its shape tells a clinical story (Figure 2): the risk after surgery is highest in the first days, the risk of death with age increases, and the risk of a chronic disease may be constant.

Figure 2: Three hazard shapes (left) and the survival curves they produce (right). A constant hazard of 5% per month gives the exponential curve \(S(t) = e^{-0.05t}\). A decreasing hazard makes the curve drop fast early and then flatten; an increasing hazard does the opposite.

A hazard is a rate, not a probability, so it has a unit (per month, per year) and can be larger than 1. The ratio of two hazards, the hazard ratio (HR), has no unit; it is what Cox regression estimates.

The cumulative hazard \(H(t)\)

\[H(t) = \int_0^t h(u)\,du, \qquad S(t) = e^{-H(t)}\]

adds the hazard up over time. With a constant hazard \(h\), \(H(t) = h\,t\). \(H(t)\) can be read roughly as the expected number of events a patient would have had by time \(t\) if the event could repeat.

TipWhat to remember
  • \(S(t)\), \(h(t)\) and \(H(t)\) are three descriptions of the same thing: know one and you know the others. If two groups differ in one, they differ in all three.
  • \(S(t)\) is the easiest to explain to patients. Hazards are what the models work with.
  • The Kaplan-Meier module draws four views of the same estimate: \(S(t)\), the cumulative incidence \(1 - S(t)\), the cumulative hazard \(H(t)\), and \(\log(-\log S(t)) = \log H(t)\).

Next: Kaplan-Meier: estimating the survival curve

Back to top