Survival Analysis in R
Learn to handle censored time-to-event data in R and to estimate, plot and interpret Kaplan-Meier curves, Weibull models and Cox models.
Survival analysis answers questions about how long it takes until something happens, such as whether patients on a new drug live longer or how quickly people who lose a job find new work. Often the event has not happened by the time observation ends, and this censoring is why standard statistical methods fall short. You work in R with survival objects, build Kaplan-Meier curves, and fit Weibull and Cox models to see how covariates shift the time until an event.
What You Will Achieve
- Prepare censored time-to-event data in R with the Surv() function and read a survival curve
- Compute and plot a Kaplan-Meier estimate and tell when and why the curve drops
- Fit Weibull and log-normal models with survreg() and interpret their coefficients for covariates
- Fit a Cox model, check the proportional hazards assumption and compare the survival curves it produces
Program Overview
Survival Analysis Basics and Censoring
Why time-to-event data need their own methods, what censoring means, and how the distribution of elapsed time is described.
- GBSG2 and UnempDur datasets
- Survival objects built with Surv()
- Measures used to describe survival
- Interpreting survival curves
Estimating Survival Curves with Kaplan-Meier and Weibull
Two ways to estimate a survival curve, with plots that communicate and compare the results.
- Kaplan-Meier estimation
- What happens when censoring is ignored
- Median survival and quantiles with a Weibull fit
- Weibull curve versus Kaplan-Meier estimate
Weibull Models with Covariates and the Cox Model
Models that measure how covariates affect the time to an event, including other distributions and the semi-parametric Cox approach.
- Coefficients, survreg() arguments and ggsurvplot() options
- Weibull versus log-normal models
- Proportional hazards assumption
- Cox survival curves, surv_summary() and capstone exercises
Certificate Awarded (Paid)
Job Outlook
Time-to-event methods are used in clinical research on how long patients survive, in studies of how fast unemployed people find jobs, and in customer analytics on how long subscribers stay.
Good for: R users in clinical, labor market or customer research who need to model how long it takes until an event happens.
Keep in mind: It stays with the basic concepts, centered on Kaplan-Meier curves and Weibull and Cox models, with a log-normal model as the one other distribution fitted.
Bottom line: A focused path through censoring, survival curves and the three core models, with each method fitted, plotted and compared in R.
Frequently Asked Questions
What is censoring in survival analysis?
Censoring means you only know the event had not yet happened when observation stopped. The first chapter introduces it and shows why standard methods cannot handle it, and a later exercise shows what goes wrong when censoring is ignored.
How does a Cox model differ from a Weibull model?
A Weibull model assumes survival times follow a specific distribution, while the Cox model is semi-parametric and makes no such assumption, which gives it more flexibility. The final chapter explains when to prefer it and covers the proportional hazards assumption.
Does the course look beyond the Weibull distribution?
Yes. The third chapter covers distributions other than Weibull and the survreg() arguments that select them, then has you fit a log-normal model alongside a Weibull model and compare the two.
What are the two capstone exercises?
The last chapter closes with two capstone exercises: one on computing and reading a Cox model, and one on comparing survival curves, so the main methods are applied together before the course finishes.


There are no reviews yet.