[R] How to access results of survival analysis

Heinz Tuechler tuechler at gmx.at
Sat Feb 5 16:44:30 CET 2005


Hello Ales,

thank you for your hint regarding names(summary(fit)). Summary(fit) is a
list containig all important results of the Cox-model.
So it helps a lot!
Regarding the results of a Kaplan-Meier estimate summary does not help,
because it does not contain the main results.

Thanks again,
Heinz Tüchler

ps. If I understood it right, you answered only to me and not to the list.
So I assumed that you prefer not to put your answer on the list and
therefore I answer to you off-list.

At 09:24 05.02.2005 +0100, Ales Ziberna wrote:
>Hi!
>
>I don't now how to reach the median directly. However I can help you whit 
>cox-PH coefficients.
>
>if fit is the resoult of the coxph, then
>
>fit$coefficients should give you the coefficients. To see whatother things 
>you can acces in similar way, see
>names(fit)
>or
>names(summary(fit)).
>
>I hope this helps at least a little!
>
>Ales Ziberna
>
>
>----- Original Message ----- 
>From: "Heinz Tuechler" <tuechler at gmx.at>
>To: <r-help at stat.math.ethz.ch>
>Sent: Friday, February 04, 2005 11:17 PM
>Subject: [R] How to access results of survival analysis
>
>
>Hello,
>
>it seems that the main results of survival analysis with package survival
>are shown only as side effects of the print method.
>
>If I compute e.g. a Kaplan-Meier estimate by
>> km.survdur<-survfit(s.survdur)
>then I can simply print the results by
>> km.survdur
>Call: survfit(formula = s.survdur)
>
>      n  events  median 0.95LCL 0.95UCL
>  100.0    58.0    46.8    41.0    79.3
>
>Is there a simple method to access these results, e.g. if I want to print
>only the median with the confidence limits?
>Regarding the results of a Cox-PH-model I face the same situation. The
>printed results are:
>> cx.survdur.ipss_mds.sex
>Call:
>coxph(formula = s.survdur ~ x1 + x2, method = "efron")
>
>       coef exp(coef) se(coef)     z      p
>x1   0.6424      1.90    0.206 3.123 0.0018
>x2.L 0.0616      1.06    0.263 0.234 0.8100
>
>Likelihood ratio test=9.56  on 2 df, p=0.0084  n=58 (42 observations
>deleted due to missing)
>
>Is there a simple method to copy e.g. the coefficients and p-values in a
>new object?
>
>I am working with:
>R : Copyright 2004, The R Foundation for Statistical Computing
>Version 2.0.1  (2004-11-15), ISBN 3-900051-07-0
>Survival package version: survival_2.16
>Operating System: Windows 98SE
>
>Thanks,
>Heinz Tüchler
>
>______________________________________________
>R-help at stat.math.ethz.ch mailing list
>https://stat.ethz.ch/mailman/listinfo/r-help
>PLEASE do read the posting guide! 
>http://www.R-project.org/posting-guide.html
>
>
>




More information about the R-help mailing list