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

Comparing Weibull model and Kaplan-Meier estimate

Let's plot the survival curve we get from the Weibull model for the GBSG2 data!

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ı

  • Compute the Weibull model for the GBSG2 data.
  • Compute the survival curve from the model.
  • Plot the survival curves you get from the two estimates.

Uygulamalı interaktif egzersiz

Bu örnek kodu tamamlayarak bu egzersizi bitirin.

# Weibull model
wb <- ___(___(___, ___) ~ ___, ___)

# Retrieve survival curve from model
surv <- seq(.99, .01, by = -.01)

# Get time for each probability
t <- predict(___, type = ___, p = ___, newdata = data.frame(___))

# Create data frame with the information needed for ggsurvplot_df
surv_wb <- data.frame(time = ___, surv = ___, 
  upper = NA, lower = NA, std.err = NA)

# Plot
ggsurvplot_df(fit = ___, surv.geom = ___)
Kodu Düzenle ve Çalıştır