當我用兩個不同的審查事件繪制資料的 survfit 圖時,整體圖 (s0) 不會從時間 = 0、pstate = 100% 開始,而是在第一個審查事件發生時跳到 100%。

在這里,您可以在一個示例中看到,跳轉發生在時間 1,即第一個 cencoring 事件。
library(survival)
library(ggfortify)
library(tidyverse)
set.seed(1337)
dummy_data = tibble(time = sample.int(100, 100, replace = TRUE),
event = sample.int(3, 100, replace = TRUE))%>%
mutate(event = factor(event))
kaplanMeier <- survfit(Surv(time, event) ~ 1, data=dummy_data)
autoplot(kaplanMeier, facets = TRUE)
uj5u.com熱心網友回復:
這似乎是 ggfortify 中的一個錯誤。作為臨時修復,您可以通過執行以下操作將 t = 0 的生存百分比設定為 100%:
p <- autoplot(kaplanMeier, facets = TRUE)
p$layers[[1]]$data[1, c(5, 7, 8)] <- 1
p

轉載請註明出處,本文鏈接:https://www.uj5u.com/shujuku/453820.html
上一篇:通過邊界框或多邊形子集空間特征
下一篇:如何跨幾何對齊比例轉換?
