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

Connected

Exercise

Computing a Weibull model and the survival curves

In this exercise we will reproduce the example from the video using the following steps:

  • Compute Weibull model
  • Decide on "imaginary patients"
  • Compute survival curves
  • Create data.frame with survival curve information
  • Plot

In this exercise, we will focus on the first three steps. The next exercise will cover the remaining steps.

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

Instructions 1/2

undefined XP
    1
    2
  • Compute the Weibull model for the GBSG2 data with covariates horTh and tsize.
  • Decide on "imaginary patients": the two levels of horTh and the 25%, 50%, and 75% quantiles of tsize.