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

Exercise

Capstone: Comparing survival curves

We saw from the last exercise that performance scores do have an effect on the survival probability. Now, let's take a look at the survival curve of all individuals using the Kaplan-Meier estimate and compare it to the curve of a Cox model that takes performance into account. Note that for Cox models, you can just enter the survfit() output into ggsurvplot() instead of creating the needed data frame yourself and plugging it into ggsurvplot_df().

Instructions 1/4

undefined XP
    1
    2
    3
    4
  • Estimate the survival curve for lung cancer patients using the Kaplan-Meier method.
  • Compute the Cox model curve for lung cancer patients that takes performance score into account.