[R]plot.survfit

Thomas Lumley tlumley at u.washington.edu
Tue Dec 23 16:36:17 CET 2003


On Tue, 23 Dec 2003, Fredrik Lundgren wrote:

> Hello,
>
> How do I get plot.survfit to draw a survival curve with prespecified
> time periods, say 1 month, 2, months, 3 months, 6 months, 1 year, 2
> years etc) instead of the individual times of all events?
>

Why would you want to do that?

If you have only one survival curve you can create a function that
describes it

survfun<-approxfun(fit$time,fit$surv,yleft=1,f=0,method="constant")

and then evaluate and plot this function whereever you want.

	-thomas




More information about the R-help mailing list