Welcome

These are the materials for workshops on survival analysis with tidymodels. The tidymodels framework is a collection of packages for modeling and machine learning using tidyverse principles.

This course will teach you core tidymodels packages and their uses: data splitting/resampling with rsample, model fitting with parsnip, measuring model performance with yardstick, and basic model optimization with tune. Time permitting, you’ll be introduced to pre-processing using the recipes package. You’ll learn tidymodels syntax as well as the process of predictive modeling for tabular data.

Is this workshop for me?

This workshop is for you if you:

  • are familiar with basic survival analysis such as censoring of time-to-event data, Kaplan-Meier curves, proportional hazards models
  • are familiar with the basic predictive modeling workflow such as split in train and test set, resampling, tuning via grid search
  • want to learn how to leverage the tidymodels framework for survival analysis

Intermediate or expert familiarity with modeling or machine learning is not required.

Preparation

The process to set up your computer for either workshop will look the same. Please join the workshop with a computer that has the following installed (all available for free):

# Install the packages for the workshop
pkgs <- 
  c("aorsf", "censored", "glmnet", "partykit", "pec", "rpart", "tidymodels")

install.packages(pkgs)

If you’re a Windows user and encounter an error message during installation noting a missing Rtools installation, install Rtools using the installer linked here.

Slides

These slides are designed to use with live teaching and are published for workshop participants’ convenience. There are not meant as standalone learning materials. For that, we recommend tidymodels.org and Tidy Modeling with R.

There’s also a page for slide annotations; these are extra notes for selected slides.

Code

Quarto files for working along are available on GitHub. (Don’t worry if you haven’t used Quarto before; it will feel familiar to R Markdown users.)

Acknowledgments

This website, including the slides, is made with Quarto. Please submit an issue on the GitHub repo for this workshop if you find something that could be fixed or improved.

Reuse and licensing

Unless otherwise noted (i.e. not an original creation and reused from another source), these educational materials are licensed under Creative Commons Attribution CC BY-SA 4.0.