开发者

I can't print the mean value of survfit(...)

开发者 https://www.devze.com 2022-12-17 18:23 出处:网络
I used th开发者_如何学JAVAe data, aml in survival package in R and computed a survival function by

I used th开发者_如何学JAVAe data, aml in survival package in R and computed a survival function by "survfit". Since the result of survfit doesn't show the mean value, I used the following code to print the mean:

> print(survfit(Surv(aml1$time,aml1$status)~1),show.rmean=T)

(the data I used is, aml1 <-aml[aml$x="Maintained",])

The code above worked in my friend pc, but not mine. So, I thought about downloading some extra package to use print(...show.rmean=T). But, "print" is basic, so I don't need anything to run print. Then why I can't get the mean value?


print is a generic function, with options that may be specific to the thing it's printing. In this case, options are provided by print.survfit. Although my version of survival actually doesn't have a show.rmean. Perhaps you want print.rmean? See the help for print.survfit for more information.

> print(survfit(Surv(aml1$time,aml1$status)~1), print.rmean=T)
Call: survfit(formula = Surv(aml1$time, aml1$status) ~ 1)

   records      n.max    n.start     events     *rmean *se(rmean)     median 
     23.00      23.00      23.00      18.00      36.36       9.85      27.00 
   0.95LCL    0.95UCL 
     18.00      45.00 
    * restricted mean with upper limit =  161 
0

精彩评论

暂无评论...
验证码 换一张
取 消