LoslegenKostenlos loslegen

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.

Diese Übung ist Teil des Kurses

Survival Analysis in R

Kurs anzeigen

Interaktive Übung

Vervollständige den Beispielcode, um diese Übung erfolgreich abzuschließen.

# Weibull model
wbmod <- survreg(___ ~ ___ + ___, data = GBSG2)

# Imaginary patients
newdat <- expand.grid(
  horTh = levels(GBSG2$___),
  tsize = quantile(GBSG2$___, probs = c(___, ___, ___)))
newdat
Code bearbeiten und ausführen