Skip to main content

Welcome to a Grasp lesson

Create a free account to keep studying and create your own study path.

Lesson 27

Understanding Time-to-Event Data and Censoring

Recommended resources

Welcome to the first lesson of our module on Survival Analysis. In our previous module, we concluded our study of clinical trials by focusing on how to critically appraise their results through the lenses of internal and external validity. We were concerned with the credibility and generalizability of a trial's findings. Now, we transition from this qualitative appraisal to the quantitative methods used to analyze the data that trials produce.

Much of modern medical research, particularly in fields like oncology and epidemiology, isn't just about if an event happens, but when. This brings us to the field of survival analysis. This lesson will introduce you to the unique type of data this field is built upon. We will define time-to-event data and identify the different types of censoring (right, left, and interval). Understanding these foundational concepts is the essential first step before we can model and interpret this data in later lessons.

What is Time-to-Event Data?

In many data science problems, you might be tasked with a classification (e.g., will this customer churn: yes or no?) or a regression (e.g., what will be the price of this house?). Survival analysis deals with a different kind of outcome variable that combines aspects of both.

Time-to-event data, the cornerstone of survival analysis, captures two key pieces of information for each subject:

  1. A time duration until an event of interest occurs.
  2. An event status indicator specifying whether the event was observed or not.

The "event" can be many things: death, disease recurrence, recovery, equipment failure, or even employee turnover. The "time" begins from a well-defined starting point, such as a diagnosis date, the start of treatment, or a hiring date.

The Basics of Survival Analysis - Fong Chun Chan's Blog

This blog post by Fong Chun Chan provides a concise introduction to the core idea of survival analysis.

Read the section "What is Survival Analysis?" to formalize your understanding of a time-to-event variable.

As the article notes, the outcome is a pair: the event and the time value. This is what makes it different from standard regression or classification problems and requires a specialized set of statistical tools.


The Challenge of Incomplete Information: Censoring

The primary feature that complicates the analysis of time-to-event data is censoring. In an ideal world, we would follow every participant in our study from their start point until they all experience the event of interest. In reality, this is almost never possible. Studies have finite durations, and people have complex lives.

Censoring occurs when we have some information about an individual's survival time, but we don't know it exactly. It's a form of missing data, but it's distinct from the "missing at random" values you might encounter in other datasets. A censored observation is not completely missing; it provides valuable partial information—for instance, that a patient survived for at least a certain amount of time.

The notion of Censoring in Survival Analysis - JiGSO

This article from JiGSO introduces the fundamental concept of censoring.

Read the sections "What is censoring?" and "Left and right censoring in Survival Analysis" for a clear definition and a high-level overview of the main types.

The three most common reasons for censoring in a study are:

  • The study ends before the participant has had the event.
  • The participant is lost to follow-up (e.g., they move and can no longer be contacted).
  • The participant voluntarily withdraws from the study.

Disregarding censored data is a major error. If we only analyzed subjects for whom we observed the event, we would be systematically excluding those with longer survival times, leading to a biased and pessimistic estimate of survival. Survival analysis methods are specifically designed to incorporate the information from both censored and uncensored observations.

There are three main types of censoring we need to be able to identify.


The Three Types of Censoring

Let's dive into the specifics of right, left, and interval censoring. The following video provides excellent, real-world examples that we will build upon.

Censoring and Truncation + LOADS OF EXAMPLES - [Survival Analysis 2/8]

This video from the zedstatistics channel clearly defines and illustrates the three main types of censoring.

Watch the initial explanations from the introduction to censoring types. This will give you a quick definition of left, interval, and right censoring, which we will then explore in more detail.

1. Right Censoring

This is by far the most common type of censoring encountered in practice. Right censoring occurs when a subject's follow-up time ends before the event is observed. We know their true time-to-event is greater than the time we were able to follow them.

This happens for several reasons, as illustrated in the timeline below.

This diagram shows the follow-up for five individuals (A-E) over a six-month period. An event is marked with a dagger (†), while arrows indicate that the individual was lost, dropped out, or the study ended before an event was observed. Individuals A, C, and E are right-censored; B and D experienced the event.

In the diagram above:

  • Individuals B and D experience the event (indicated by the dagger symbol) during the study period. Their event times are fully observed.
  • Individual E completes the entire 6-month study period without experiencing the event. We don't know what happened after month 6. Their event time is right-censored at 6 months; we only know their true survival time is > 6 months.
  • Individuals A and C leave the study early, before the event occurs. They are "lost to follow-up" or "dropped out." We know they were event-free up to their departure, but not after. Individual A is right-censored at ~3.5 months, and C is right-censored at ~3 months.

Censoring and Truncation + LOADS OF EXAMPLES - [Survival Analysis 2/8]

Let's revisit the zedstatistics video for a detailed example of right censoring.

Watch the segment on right censoring. The pancreatic cancer study example clearly shows how censoring occurs both when patients are still alive at the end of the study and when they are lost to follow-up.

2. Left Censoring

Left censoring is the reverse of right censoring. It occurs when the event has already happened before observation begins. The true time-to-event is known to be less than the first observation time.

Left censoring is less common in clinical trials involving mortality (since you typically don't enroll patients who have already died), but it can occur in other scenarios.

This timeline illustrates how different types of censoring can arise in a study tracking a virus. The "virus outbreak" marks the beginning of the risk period (time zero). Some individuals' infection status is unknown at the start, leading to left censoring.

In the context of the diagram above, imagine the "testing round" is the first time we assess the subjects. If someone tests positive at this very first check, we know they contracted the virus sometime between the outbreak (time zero) and the test. Their exact time of infection is unknown, only that it is less than the time of the first test. This is a classic case of left censoring.

Censoring and Truncation + LOADS OF EXAMPLES - [Survival Analysis 2/8]

The zedstatistics video provides another excellent, intuitive example of left censoring.

Watch the explanation using the study on the age at menarche. This highlights a situation where enrolling participants after they may have already experienced the event naturally leads to left-censored data.

3. Interval Censoring

Interval censoring occurs when we know the event happened within a specific time interval, but we don't know the exact moment. This is very common in studies where subjects are assessed periodically rather than continuously.

Look again at the "Timeline of a Virus Outbreak and Testing" image. Consider the individual on the third line from the top. They have a negative test at the first "testing round," but a positive test later on. We know they contracted the virus, and we know it happened after the first test but before (or at) the second test. The true event time is confined to that interval.

This is a very common scenario in studies of non-fatal events where detection depends on periodic check-ups (e.g., cancer screening, dental exams).

How Censoring Works | NEJM Evidence

The New England Journal of Medicine (NEJM) provides a very simple analogy for interval censoring.

Watch this short segment on interval censored data. The "mushy pumpkin" example is a memorable way to understand the concept.


Conclusion

In this lesson, we have taken our first steps into the world of survival analysis. We have moved from asking if an event occurred to asking when. This required us to understand the unique structure of time-to-event data and the critical challenge posed by incomplete observations, a phenomenon known as censoring.

Here are the key takeaways:

  • Time-to-event data consists of a pair of variables: a time duration and an event status indicator.
  • Censoring occurs when the exact time-to-event is unknown, but we have partial information. It is essential to include censored observations in our analysis to avoid bias.
  • Right censoring, the most common type, means the event occurred after our last observation time.
  • Left censoring means the event occurred before our first observation time.
  • Interval censoring means the event occurred between two observation times.

Now that we have a solid grasp of the kind of data we are working with, our next step is to learn about the mathematical tools used to describe and summarize it. In the next lesson, we will explore the fundamental concepts of the survival function and the hazard function. To do this, we will first build an intuitive understanding of derivatives and integrals, as they are the mathematical language used to define instantaneous risk and cumulative survival.