Re: [R] command in survival package

From: Thomas Lumley <tlumley_at_u.washington.edu>
Date: Sat 21 Jan 2006 - 10:27:53 EST

On Fri, 20 Jan 2006, Linda Lei wrote:

> Hi there,
>
>
>
> I have a question about one command sentence when I follow the example
> in the book of "Survival analysis in S":
>
> > aml1<-aml[aml$group==1]

If this is really what the book says you should probably complain to the author. However, if it says

   aml1<-aml[aml$group==1,]
then you show type that instead.

It is hard to be sure, because you don't say where the `aml' data set comes from. It can't be the one in the survival package as this doesn't have a variable called "group"

>
> Thus, I couldn't keep going on the next command:
>
> esf.fit<-survfit(Surv(aml1,status)~1).
>

This looks implausible as well. I would have expected something like

   esf.fit<-survfit(Surv(time,status)~1, data=aml1)

         -thomas



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Sat Jan 21 10:35:14 2006

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:42:08 EST