[R] 1 - Survival Plot
Kevin E. Thorpe
kevin.thorpe at utoronto.ca
Fri Mar 26 01:27:14 CET 2010
Euphoria wrote:
> Hi all!
>
> I have created survival vs. time plots. Now I would like to plot (1 -
> Survival) vs. time.
> Is there a way for me to retrieve the survival estimate information, to
> which I can manually make an adjustment (ie; failure = 1 - survival) before
> I re-plot this information?
>
> Here is the code I use to attain the survival vs. time plot:
>
> plot (survfit (Surv(DTDMRS3, DMRS3) ~ RS2540477, data = wise),
> lty = 1:2:3, mark.DTDMRS3 = 0, ylab = "Probability", xlab = "Survival Time
> in Days")
> legend(200, 0.2, legend = c ("CC", "TC", "TT"), lty = c(3, 2, 1), title
> "LAT4H")
>
> Thanks!
In the help file for plot.survfit you can read about the fun argument.
fun="event" does what you want.
--
Kevin E. Thorpe
Biostatistician/Trialist, Knowledge Translation Program
Assistant Professor, Dalla Lana School of Public Health
University of Toronto
email: kevin.thorpe at utoronto.ca Tel: 416.864.5776 Fax: 416.864.3016
More information about the R-help
mailing list