我正在尝试打印包survfit
创建的对象的受限平均存活率和标准错误。survival
当我从我的完整数据中运行以下示例摘录时,我无法rmean
在摘要中显示(在我的完整数据中的所有 1000 个 obs 上运行时也不会显示)。
require(survival)
dat <- structure(list(treat = c("Treat", "Control", "Treat", "Treat",
"Control", "Treat", "Treat", "Control", "Control", "Treat", "Treat",
"Control", "Control", "Control", "Treat", "Control", "Treat",
"Control", "Control", "Control", "Control", "Control", "Control",
"Control", "Control", "Control", "Control", "Control", "Control",
"Control", "Control", "Control", "Control", "Control", "Treat",
"Control", "Control", "Control", "Treat", "Control", "Control",
"Control", "Control", "Treat", "Control", "Treat", "Control",
"Treat", "Treat", "Control"), days = c(40, 90, 90, 90,
90, 90, 90, 90, 90, 59, 51, 68, 90, 90, 51, 2, 29, 64, 90, 90,
90, 81, 35, 19, 55, 90, 90, 90, 90, 90, 90, 90, 40, 3, 38, 90,
32, 90, 90, 67, 42, 90, 90, 90, 66, 90, 90, 90, 90, 90), status = c(1,
0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0, 0, 0, 1,
1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0,
0, 1, 0, 0, 0, 0, 0)), .Names = c("treat", "days", "status"
), row.names = c(NA, 50L), class = "data.frame")
t.Surv <- Surv(dat$days, dat$status==1)
print(survfit(t.Surv~treat, data=dat), show.rmean=TRUE)
# Call: survfit(formula = t.Surv ~ treat, data = dat)
# records n.max n.start events median 0.95LCL 0.95UCL
# treat=Control 35 35 35 13 NA 81 NA
# treat=Treat 15 15 15 6 NA 51 NA