Hi all, I am trying to draw a Kaplan-Meier curve and I found online that Kaplan - Meier estimates are computed with a function called km in the event package. Is there an update for that because when I choose to download packages in R,. there is no package called event, even though I have selected all the repositories. Thanks in advance, Eleni [[alternative HTML version deleted]]
See the survfit() in the survival package which is one on the recommended packages that should (I think) have come with R. Eleni Christodoulou wrote:> Hi all, > > I am trying to draw a Kaplan-Meier curve and I found online that Kaplan - > Meier estimates are computed with a function called km in the event package. > Is there an update for that because when I choose to download packages in > R,. there is no package called event, even though I have selected all the > repositories. > > Thanks in advance, > Eleni >-- Kevin E. Thorpe Biostatistician/Trialist, Knowledge Translation Program Assistant Professor, Department of Public Health Sciences Faculty of Medicine, University of Toronto email: kevin.thorpe at utoronto.ca Tel: 416.864.5776 Fax: 416.864.6057
Eleni Christodoulou <elenichri <at> gmail.com> writes:> I am trying to draw a Kaplan-Meier curve and I found online that Kaplan - > Meier estimates are computed with a function called km in the event package. > Is there an update for that because when I choose to download packages in > R,. there is no package called event, even though I have selected all the > repositories. >The standard survival package is package survival. Try survfit, plot.survfit, and summary(survfit). There are some fancy extension in package Design, but better start with survival, Design-based KM have huge options list that can be confusing at first. Dieter
check function survfit() in package survival.
Best,
Dimitris
----
Dimitris Rizopoulos
Ph.D. Student
Biostatistical Centre
School of Public Health
Catholic University of Leuven
Address: Kapucijnenvoer 35, Leuven, Belgium
Tel: +32/(0)16/336899
Fax: +32/(0)16/337015
Web: http://med.kuleuven.be/biostat/
http://www.student.kuleuven.be/~m0390867/dimitris.htm
----- Original Message -----
From: "Eleni Christodoulou" <elenichri at gmail.com>
To: <r-help at r-project.org>
Sent: Thursday, February 14, 2008 2:50 PM
Subject: [R] Kaplan Meier function
> Hi all,
>
> I am trying to draw a Kaplan-Meier curve and I found online that
> Kaplan -
> Meier estimates are computed with a function called km in the event
> package.
> Is there an update for that because when I choose to download
> packages in
> R,. there is no package called event, even though I have selected
> all the
> repositories.
>
> Thanks in advance,
> Eleni
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>
Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm
Hi Eleni, hi list, here is small sample program, the library is "survival", it is included in the standard R distribution.> 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? Like here: http://www.drugs.com/pro/images/8c3bb783-1c3c-4d75-a502-2f7ee3632f41/inspra-image02.jpg Best wishes, Matthias Eleni Christodoulou schrieb:> Hi all, > > I am trying to draw a Kaplan-Meier curve and I found online that Kaplan - > Meier estimates are computed with a function called km in the event package. > Is there an update for that because when I choose to download packages in > R,. there is no package called event, even though I have selected all the > repositories. > > Thanks in advance, > Eleni > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. > >