I can't print the mean value of survfit(...)
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
精彩评论