BaşlayınÜcretsiz Başlayın

Estimating and visualizing a survival curve

Let's take a look at the survival of breast cancer patients.

In this exercise, we work with the GBSG2 dataset again.

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

Bu egzersiz

Survival Analysis in R

kursunun bir parçasıdır
Kursu Görüntüle

Egzersiz talimatları

  • Estimate a survivor function for the breast cancer patients.
  • Visualize the estimated survival function using the function ggsurvplot().
  • Add a risk table to the plot showing the number of patients under observation. This can be done using the risk.table argument.
  • Add a line showing the median survival time to the plot. This can be done using the surv.median.line argument.

Uygulamalı interaktif egzersiz

Bu örnek kodu tamamlayarak bu egzersizi bitirin.

# Kaplan-Meier estimate
km <- survfit(Surv(___, ___) ~ ___, data = ___)

# Plot of the Kaplan-Meier estimate
ggsurvplot(___)

# Add the risk table to plot
ggsurvplot(___, ___ = TRUE)

# Add a line showing the median survival time
ggsurvplot(___, ___ = TRUE, ___ = "hv")
Kodu Düzenle ve Çalıştır