[R] Survival Regression with multiple records per subject

From: Fabian Hefner <fabian-hefner_at_web.de>
Date: Wed, 30 Apr 2008 13:25:01 +0200

Dear R users!

I reformulate the question with another example perhaps my question will be more clearly now.  

I have several subjects. One subject has multiple records. Only a starting point exists the end point is vague.
Here is an example:  

   itm      ID     exercise      time
1.401869    1        0             1
1.324390    1        0             2
1.324390    1        0             3
1.333338    1        0             4
1.346761    1        0             5
1.315441    1        1             6
1.337812    2        0             1
1.319915    2        0             2
1.351235    2        1             3

itm is the covariate;
ID is the subject Id;
exercise indicates if the subject is dead=1 or alive=0  

How can I allocate the multiple records to one subject (for example record 1-6 are part of subject with ID 1 record 7-9 are part of subject with ID2) and process a survival regression.  

the "survRegData <- survreg(formula=Surv(time,exercise)~itm, data=Data, dist="weibull")" command doesn't take into account that multiple records are part of one subject.  

Many thanks!  

Fabian Hefner



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 Wed 30 Apr 2008 - 13:03:05 GMT

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 Wed 30 Apr 2008 - 20:31:39 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