Visualizing the results of a Weibull model

Survival Analysis in R

Heidi Seibold

Statistician at LMU Munich

Visualizing a Weibull model

Visualization tools often focus on step functions.

So the following code does NOT work:

wb <- survreg(Surv(time, cens) ~ 1)
ggsurvplot(wb)

Survival Analysis in R

Visualizing a Weibull model

wb <- survreg(Surv(time, cens) ~ 1)

Survival curve:

surv <- seq(.99, .01, by = -.01)
t <- predict(wb, type = "quantile", p = 1 - surv, newdata = data.frame(1))

surv_wb <- data.frame(time = t, surv = surv, upper = NA, lower = NA, std.err = NA)

Plot:

ggsurvplot_df(fit = surv_wb, surv.geom = geom_line)
Survival Analysis in R

Survival Analysis in R

Let's practice!

Survival Analysis in R

Preparing Video For Download...