As has already been pointed out, a plot of the cumulative probability
of death, 1 - Kaplan-Meier, can be obtained in the newer releases using
the "fun" argument to plot:
fit <- survfit(Surv(time, status) ~ 1, data=lung)
plot(fit, fun='event')
The argument is very general, for instance fun=sqrt would plot on a square
root scale.
For older versions there is a trick that can be used-- modify rows of the
data object:
fit$surv <- 1-fit$surv
fit$upper <- 1-fit$upper
fit$lower <- 1-fit$lower
plot(fit, xlim= range(fit$time))
The xlim argument cuts off the extra point (time=0, surv=1) that is usually
added by the plot routine.
Terry Therneau
-----------------------------------------------------------------------
This message was distributed by s-news@wubios.wustl.edu. To unsubscribe
send e-mail to s-news-request@wubios.wustl.edu with the BODY of the
message: unsubscribe s-news
|