From: Frank E Harrell Jr (fharrell@virginia.edu)
Date: Tue 14 Jan 2003 - 13:45:48 EST
Message-id: <20030113214548.1ca4b45d.fharrell@virginia.edu>
On Mon, 13 Jan 2003 12:06:55 -0800
Ngayee J Law <Ngayee.Law@celeradiagnostics.com> wrote:
> Hello all,
>
> Is there a function to do log-rank test in R? Thanks!
>
> - Jacqueline
>
It's a special case of the Cox model (see coxph in the survival package). If you want the standard logrank test, see the logrank function in the Hmisc package (it does not handle stratification though). E.g.
library(Hmisc)
logrank(Surv(d.time,death), treatment) # assumes treatment coded 1,2
See http://hesweb1.med.virginia.edu/biostat/s/Hmisc.html
-- Frank E Harrell Jr Prof. of Biostatistics & Statistics Div. of Biostatistics & Epidem. Dept. of Health Evaluation Sciences U. Virginia School of Medicine http://hesweb1.med.virginia.edu/biostat______________________________________________ R-help@stat.math.ethz.ch mailing list http://www.stat.math.ethz.ch/mailman/listinfo/r-help
This archive was generated by hypermail 2.1.3 : Tue 01 Jul 2003 - 09:11:19 EST