[R] Empirical cumulative distribution with censored data

Peter Dalgaard p.dalgaard at biostat.ku.dk
Sun Jan 16 22:24:16 CET 2005


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?


-- 
   O__  ---- Peter Dalgaard             Blegdamsvej 3  
  c/ /'_ --- Dept. of Biostatistics     2200 Cph. N   
 (*) \(*) -- University of Copenhagen   Denmark      Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk)             FAX: (+45) 35327907




More information about the R-help mailing list