Marco Chiarandini
2005-Jan-16 20:22 UTC
[R] Empirical cumulative distribution with censored data
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? Thank you for consideration, Ragards, ------------------------------------------------------------------- Marco Chiarandini, Fachgebiet Intellektik, Fachbereich Informatik, Technische Universit?t Darmstadt
Marco Chiarandini
2005-Jan-16 20:46 UTC
[R] Empirical cumulative distribution with censored data
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
Peter Dalgaard
2005-Jan-16 21:24 UTC
[R] Empirical cumulative distribution with censored data
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