[R] Survival-Analysis: How to get numerical values from survfit (and not just a plot)?

Arthur Allignol arthur.allignol at fdm.uni-freiburg.de
Tue Feb 17 16:43:58 CET 2009


See ?survfit.object

if fit is the object you get using survfit,
fit$surv will give you the survival probability.


Bernhard Reinhardt wrote:
> Hi!
> I came across R just a few days ago since I was looking for a toolbox 
> for cox-regression.
> I´ve read
> "Cox Proportional-Hazards Regression for Survival Data
> Appendix to An R and S-PLUS Companion to Applied Regression" from John Fox.
> As described therein plotting survival-functions works well 
> (plot(survfit(model))). But I´d like to do some manipulation with the 
> survival-functions before plotting them e.g. dividing one 
> survival-function by another.
> survfit() only returns an object of the following structure
>      n events median 0.9LCL 0.9UCL
> 55.000 55.000  1.033  0.696  1.637
> Can you tell me how I can calculate a survival- or baseline-function out 
> of these values and how I extract the values from the object? I´m sure 
> the calculation is done by the corresponding plot-routine, but I 
> couldn´t find that one either.
> Regards
> Bernhard
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide 
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.

More information about the R-help mailing list