1. Learn
  2. /
  3. Courses
  4. /
  5. Survival Analysis in R

Connected

Exercise

Comparing Weibull and Log-Normal Model I

In this exercise, we want to add the correct survival probabilities to a data frame. This data frame will be used to plot the survival curves. surv_wide is a wide data frame containing hormonal therapy information and the survival curves for the Weibull and log-normal models.

The survival, survminer, and reshape2 packages and the GBSG2 data are loaded for you in this exercise.

Instructions

100 XP
  • Melt the data frame into long format.
  • Use surv_long$surv_id to add the correct survival probabilities surv to the data frame.