Skip to main content
HomePython

Course

Survival Analysis in Python

AdvancedSkill Level
4.7+
71 reviews
Updated 06/2024
Use survival analysis to work with time-to-event data and predict survival time.
Start Course for Free
PythonProbability & Statistics
4 hr
16 videos
48 Exercises
3,850 XP
5,827
Statement of Accomplishment

Create Your Free Account

Continue with GoogleShow more options

or


By continuing, you accept our Terms of Use, our Privacy Policy and that your data is stored in the USA.

Loved by learners at thousands of companies

Group

Training a Team?

Try for Business

Course Description

How long does it take for flu symptoms to show after exposure? And what if you don't know when people caught the virus? Do salary and work-life balance influence the speed of employee turnover? Lots of real-life challenges require survival analysis to robustly estimate the time until an event to help us draw insights from time-to-event distributions. This course introduces you to the basic concepts of survival analysis. Through hands-on practice, you’ll learn how to compute, visualize, interpret, and compare survival curves using Kaplan-Meier, Weibull, and Cox PH models. By the end of this course, you’ll be able to model survival distributions, build pretty plots of survival curves, and even predict survival durations.

Prerequisites

Introduction to Regression with statsmodels in PythonHypothesis Testing in Python
1

Introduction to Survival Analysis

What problems does survival analysis solve, and what is censorship? You’ll answer these questions as you explore survival analysis data, build survival curves, and make basic estimations of survival time.
Start Chapter
2

Survival Curve Estimation

In this chapter, you’ll learn how the Kaplan-Meier model works and how to fit, visualize, and interpret it. You’ll then apply this model to explore how categorical variables affect survival and learn how to supplement your analysis using hypothesis testing methods like the log-rank test.
Start Chapter
3

The Weibull Model

Discover how to model time-to-event data with parametric models. Learn how to use the Weibull model and the Weibull AFT model and what different purposes they serve. Use survival regression to make inferences about how covariates affect the survival function and learn how to select the best survival model for your data.
Start Chapter
4

The Cox PH Model

Another chapter, another model! In this final chapter, you'll learn about the proportional hazards assumption and the role it plays in fitting and interpreting the Cox Proportional Hazards model. You’ll also learn how to predict new subjects' survival times using the Cox Proportional Hazards model.
Start Chapter
Survival Analysis in Python
Course
Complete

Earn Statement of Accomplishment

Add this credential to your LinkedIn profile, resume, or CV
Share it on social media and in your performance review
Enroll Now

Don’t just take our word for it

*4.7
from 71 reviews
77%
21%
1%
0%
0%
  • FABIAN
    2 weeks ago

  • Avril
    3 weeks ago

  • Mal
    4 weeks ago

    great course, very interesting and well explained. My only complaint would be that there's many options for plotting the same survival curve, and the exercises penalise you if you use a different one (even if it produces the same plot)! Also, a refresh may be needed as there's some clunky python (not selecting using .loc and the unnecessary use of .apply early in the course)

  • PRINCE
    5 weeks ago

  • Isaac
    5 weeks ago

  • Lucole
    6 weeks ago

FABIAN

Avril

PRINCE

FAQs

What survival analysis models does this course teach?

You will learn to fit and interpret Kaplan-Meier, Weibull, Weibull AFT, and Cox Proportional Hazards models, covering both nonparametric and parametric approaches.

What is censoring and does the course explain it?

Censoring occurs when the event of interest has not yet happened for some subjects by the study end. Chapter 1 introduces censoring as a fundamental concept and shows how to handle it.

What real-world scenarios are explored in the exercises?

You will analyze flu symptom onset times and employee turnover data, examining how factors like salary and work-life balance affect time-to-event outcomes.

What Python prerequisites do I need for this advanced course?

You need pandas, seaborn, statsmodels regression, hypothesis testing, sampling, and intermediate Python. This is an advanced statistics course with substantial prerequisites.

Can I make predictions with the models learned in this course?

Yes. The final chapter teaches you how to predict survival durations for new subjects using the Cox Proportional Hazards model.

Join over 19 million learners and start Survival Analysis in Python today!

Create Your Free Account

Continue with GoogleShow more options

or


By continuing, you accept our Terms of Use, our Privacy Policy and that your data is stored in the USA.

Grow your data skills with DataCamp for Mobile

Make progress on the go with our mobile courses and daily 5-minute coding challenges.