Dear help news reader, I'm trying to draw a Kaplan-Meier curve and would like to ask the news group for some help Supposing I have study comapring two drugs, "A", and "B" and I recorde the time to get to the clinical endpoint (Time), in my case becommming virus free. I have setup the following frame: Time c Drug 1 5 1 A 2 7 1 B 3 2 1 A 4 10 1 B 5 6 1 A 6 8 1 B "c" contains the coding if sucessful or not, but I think at the moment that is not important. I did fitstudy <- survfit(Surv(Time) ~ Drug, data=study) or fitstudy <- fitstudy <- survfit(Surv(Time, c) ~ Drug, data=study) and than plot(fitstudy) which gives me a Kaplan-Meier Curve, starting with 1. However I would like to the a plot starting with "0" and than showing the increasing numbers of patients becomming "virus negative". It would be great, if someone could point me in the right direction where I can find the answer. Many thanks in advance Frank Frank Mattes, MD Department of Virology Royal Free and University Medical School London
On Thu, 16 Jan 2003, Frank Mattes wrote:> Dear help news reader, > > I'm trying to draw a Kaplan-Meier curve and would like to ask the news > group for some help > Supposing I have study comapring two drugs, "A", and "B" and I recorde the > time to get to the clinical endpoint (Time), in my case becommming virus free. ><various stufff>> which gives me a Kaplan-Meier Curve, starting with 1. However I would like > to the a plot > starting with "0" and than showing the increasing numbers of patients > becomming "virus negative".You want the fun="event" option to plot.survfit. Eg data(aml) leukemia.surv <- survfit(Surv(time, status) ~ x, data = aml) # usual plot plot(leukemia.surv, lty = 2:3) # cdf (event) ploot plot(leukemia.surv, lty = 2:3,fun="event") -thomas Thomas Lumley Asst. Professor, Biostatistics tlumley at u.washington.edu University of Washington, Seattle