1

パッケージ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
4

1 に答える 1

1

引数はprint.rmeanではなくshow.rmeanです。

> print(survfit(t.Surv~treat, data=dat), print.rmean=TRUE)
Call: survfit(formula = t.Surv ~ treat, data = dat)

              records n.max n.start events *rmean *se(rmean) median 0.95LCL 0.95UCL
treat=Control      35    35      35     13   73.0       4.51     NA      81      NA
treat=Treat        15    15      15      6   71.9       5.96     NA      51      NA
    * restricted mean with upper limit =  90 
于 2013-07-07T10:00:42.243 に答える