-
Hi, thank you for this wonderful package! I wonder why I can't get the value of 1 from the estimated risk once I fill a custom time point bigger than the maximum observed time-to-event?
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
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. Also, we're really just plotting results from the {survival} package, so you can also find answers in their functions' documentation as well (where we are lacking 😱 ). |
Beta Was this translation helpful? Give feedback.
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.
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.…