[R] Kaplan Meier function

Matthias Gondan matthias-gondan at gmx.de
Thu Feb 14 16:14:23 CET 2008


Frank E Harrell Jr schrieb:
> Matthias Gondan wrote:
>>> data(colon)
>>> s = survfit(Surv(time, status) ~ rx, data=colon)
>>> plot(s)
>>> plot(s, col=1:3)
>>
>> By the way: Does anyone know a neat way to indicate the number of
>> patients under risk in
>> the curve?
> That's one of many options in the survplot function in the Design 
> package, which uses the survival package.

Ah, thanks! Nice.

data(colon)
s = survfit(Surv(time, status) ~ rx, data=colon)
survplot(s, n.risk=TRUE, conf='none', time.inc=500)

Is there an option for drawing small vertical lines if a patient has 
been censored?

Best wishes,

Matthias



More information about the R-help mailing list