Skip to main content

Survival Analysis in R

Learn to work with time-to-event data. The event may be death or finding a job after unemployment. Learn to estimate, visualize, and interpret survival models!

Start Course for Free
4 Hours14 Videos50 Exercises8,071 Learners
3650 XP

Create Your Free Account



By continuing, you accept our Terms of Use, our Privacy Policy and that your data is stored in the USA. You confirm you are at least 16 years old (13 if you are an authorized Classrooms user).

Loved by learners at thousands of companies

Course Description

Do patients taking the new drug survive longer than others? How fast do people get a new job after getting unemployed? What can I do to make my friends stay on the dancefloor at my party? All these questions require the analysis of time-to-event data, for which we use special statistical methods. This course introduces basic concepts of time-to-event data analysis, also called survival analysis. Learn how to deal with time-to-event data and how to compute, visualize and interpret survivor curves as well as Weibull and Cox models.

  1. 1

    What is Survival Analysis?


    In the first chapter, we introduce the concept of survival analysis, explain the importance of this topic, and provide a quick introduction to the theory behind survival curves. We discuss why special methods are needed when dealing with time-to-event data and introduce the concept of censoring. We also discuss how we describe the distribution of the elapsed time until an event.

    Play Chapter Now
    The term "survival analysis"
    50 xp
    Introducing the GBSG2 dataset
    100 xp
    What will this course cover?
    50 xp
    Why learn survival methods?
    50 xp
    Digging into the GBSG2 dataset 1
    100 xp
    Using the Surv() function for GBSG2
    100 xp
    The UnempDur dataset
    100 xp
    Measures used in survival analysis
    50 xp
    Interpreting a survival curve I
    50 xp
    Interpreting a survival curve II
    50 xp
    Interpreting a survival curve III
    50 xp

In the following tracks



David CamposRichie CottonShon Inouye
Heidi Seibold Headshot

Heidi Seibold

Statistician / Research & Education Ambassador, IGDORE

Heidi is an independent researcher with IGDORE and research and education ambassador at Johner Institut. Her research is on the intersection of data science, open science and medicine. Heidi has collaborated on several R packages and was reproducibility editor for the Journal of Statistical Software. She promotes open and reproducible science and sees R and Git as some of the most powerful tools for computational reproducibility in statistics and machine learning. Heidi loves to teach, especially R related topics. In her free time she likes to cycle.
See More

What do other learners have to say?

I've used other sites—Coursera, Udacity, things like that—but DataCamp's been the one that I've stuck with.

Devon Edwards Joseph
Lloyds Banking Group

DataCamp is the top resource I recommend for learning data science.

Louis Maiden
Harvard Business School

DataCamp is by far my favorite website to learn from.

Ronald Bowers
Decision Science Analytics, USAA