[R] Empirical cumulative distribution with censored data
Marco Chiarandini
machud at rbg.informatik.tu-darmstadt.de
Sun Jan 16 21:46:38 CET 2005
Peter Dalgaard wrote:
> Marco Chiarandini <machud at rbg.informatik.tu-darmstadt.de> writes:
>
>
>>Dear list,
>>
>>I would like to plot the empirical cumulative distribution of the time
>>needed by a treatment to attain a certain goal. A number of
>>experiments is run with a strict time limit. In some experiments the
>>goal is attained before the time limit, in other experiments time
>>expires before the goal is attained. The situation is very similar to
>>survivial analysis with censored data. I tryed the function:
>>
>>plot(survfit(Surv(time),data=mydata,conf.int=F))
>>
>>from the package "survival". Nevertheless, what i would like to see is
>>an increase of probability as time increases, and not a decrease of
>>survival probabilty. I tried to play with ecdf(), but dealing with the
>>censored data is quite hard-working in this case.
>>
>>Is there anything for censored data in ecdf like-functions or a way to
>>adapt plot.survfit to my case?
>
>
> Did you try the fun="event" argument?
Now yes.
It does what I want indeed.
Thank you a lot!
Marco
More information about the R-help
mailing list