[R] coxph and survfit issue - strata

From: Eva Bouguen <ebouguen_at_yahoo.fr>
Date: Fri, 06 May 2011 23:22:31 +0100 (BST)


Dear users,

In a study with recurrent events:
My objective is to get estimates of survival (obtained through a Cox model) by rank of recurrence and by treatment group. With the following code (corresponding to a model with a global effect of the treatment=rx), I get no error and manage to obtain what I want : data<-(bladder)
model1<-coxph(Surv(stop,event)~rx+strata(enum)+cluster(id),data=bladder) data1<-data.frame(rx=1)
survfit(model1,newdata=data1)

But with the model with strata by treatment interaction (corresponding to a model with an effect of the treatment by rank), I get the following error: model2<-coxph(Surv(stop,event)~rx*strata(enum)+cluster(id),data=bladder)

data1<-data.frame(rx=1)

survfit(model2,newdata=data1)
Erreur dans strata(enum) : objet "enum" non trouvé =>error in strata(enum) : object "enum" not found

Would you have any idea to help me?

Thanks in advance,

Eva

        [[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. Received on Sat 07 May 2011 - 00:50:07 GMT

This quarter's messages: by month, or sorted: [ by date ] [ by thread ] [ by subject ] [ by author ]

All messages

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Mon 09 May 2011 - 13:10:06 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive