パッケージsurvfit
によって作成されたオブジェクトの制限された平均生存率と標準誤差を出力しようとしています。survival
完全なデータから抜粋した次の例を実行するrmean
と、要約に表示されません (完全なデータから 1000 個すべての観測点を実行しても表示されません)。
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