有没有办法 "horizontally merge" 具有两个连续事件时间变量的同一数据集的两条 Kaplan-Meier 曲线?

Is there a way to "horizontally merge" two Kaplan-Meier curves of the same dataset with two consecutive time-to-event variables?

我有一个数据集,其中包含对昆虫发育时间和存活率的观察。

发育时间是从卵子排出到成虫出现之间的天数,而成虫存活是从成虫出现到死亡(或审查)之间的时间。

在我的分析中,我正在为发育时间绘制 Kaplan-Meier 反向生存曲线 (ggsurvplot(survfit_obj, fun = "event")),而对于成年生存,我使用的是经典的 Kaplan-Meier 曲线。

因为我对每个独特的个体都有这两个事件发生时间变量,所以我想知道是否有可能将两个生成的 Kaplan-Meier 曲线水平合并为一个综合曲线,或最终使用不同的估算器。

实际上,我什至不确定它是否具有可靠的统计意义,它只是在图形上有意义(见最后一张图)。

请记住,这两个事件发生时间变量有很大不同,它们不代表单个 recurrent event

您可以在下面找到我的可重现示例。

变量图例:

library(tidyverse) 
library(survival)
library(survminer)

#import database
db <- matrix(c("BRA20", "BA84", "BRA20", "BRA20", "BRA20", "BRA20", "BRA20", "BRA20", "BA84", "BRA20", "BA84", "BA84", "BRA20", "BA84", "BRA20", "BA84", "BA84", "BA84", "BRA20", "BA84", "BA84", "BA84", "BRA20", "BRA20", "BA84", "BA84", "BRA20", "BA84", 45, 27, 34, 45, 45, 56, 59, 45, 27, 42, 56, 31, 52, 27, 56, 27, 31, 59, 42, 52, 27, 34, 49, 38, 34, 63, 52, 31, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 29, 50, 11, 14, 17, 35, 14, 39, 35, 14, 35, 7, 43, 35, 50, 21, 32, 17, 11, 11, 25, 51, 28, 15, 7, 25, 14, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0), ncol = 5, byrow = F)
colnames(db) <- c("treat", "days2emerge", "new.ad", "days2event", "death")
db <- as_tibble(db)
db$days2emerge <- as.numeric(db$days2emerge)
db$new.ad <- as.numeric(db$new.ad)
db$days2event <- as.numeric(db$days2event)
db$death <- as.numeric(db$death)
#nymph developmental time
db_devtfit <- survfit(Surv(days2emerge, new.ad) ~ treat, data = db)
np <- ggsurvplot(db_devtfit, data = db, fun = "event", linetype = c("strata"), legend.title = "Groups")

#adult survival
db_survfit <- survfit(Surv(days2event, death) ~ treat, data = db)
sp <- ggsurvplot(db_survfit, data = db, censor.shape = c("X"), linetype = c("strata"), legend.title = "Groups")

考虑到这个例子,有没有办法水平合并两条不同的 Kaplan-Meier 曲线,同时考虑到它背后的统计数据?

一张图片以某种方式以图形方式表达我的意思:

我认为您无法在 ggsurvplot 中直接执行此操作,但您可以从图中删除数据并轻松构建新的:

np_dat <- np$data.survplot

np_dat$time <- np_dat$time - max(np_dat$time)
np_dat$surv <- 1 - np_dat$surv 
df <- rbind(np_dat, sp$data.survplot)

ggplot(df, aes(time, surv, color = strata)) + 
  geom_step() +
  geom_vline(xintercept = 0, linetype = 2) +
  theme_classic() +
  labs(y = 'probability of being live adult',
       x = 'time from emergence')