Skip to content

Value of estimated risk = 1 cannot be achieved with tidy_survfit()? #193

Answered by ddsjoberg
uriahf asked this question in Q&A
Discussion options

You must be logged in to vote

While the KM curve theoretically will go to 1 (on the risk scale) as time goes to infinity, we don't always observe this. Consider an example where the observed rate of the outcome are low.

library(ggsurvfit)
#> Loading required package: ggplot2

survfit2(
  Surv(time, status) ~ 1, 
  df_lung |> 
    dplyr::mutate( # lower the event rate
      status = ifelse(dplyr::row_number() > 5, 1, status)
    )
) |> 
  ggsurvfit(type = "risk") +
  scale_y_continuous(limits = c(0, 1))

Created on 2024-03-29 with reprex v2.1.0

In this case, we would not want to assume the risk at time 34 is 100%, simply because 34 is larger than any of the observed followup times.

Hope that helps illustrate the logic.…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@uriahf
Comment options

@ddsjoberg
Comment options

Answer selected by uriahf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants