[R] Survival Regression with multiple events per subject

From: Fabian Hefner <fabian-hefner_at_web.de>
Date: Mon, 28 Apr 2008 09:57:59 +0200


Dear R users!

I want to process a maximum likelihood estimation for a parametric regression survival time model with multiple events per subject.

the STATA command for this survival regression is:

use survreg
stset failure(exercise), id(optionid)
local regressors itm posret negret
streg `regressors', distribution(weibull)

explanation:
stset declares data to be survival-time data; exercise is the indicator variable, which shows if the subject is dead or alive;
optionid is the multiple-record ID variable which means every subject has a unique id and one subject can have multiple events. (see example below)

streg computes a maximum likelihood estimation for parametric regression survival time models with multiple record data

now I search an equivalent command in R
I found the survival package but I have no solution for the use with multiple records per subject.

library(survival)
survRegData <- survreg(formula=Surv(time,exercise)~itm+posret+negret, data=Data, dist="weibull")
summary(survRegData)

My Question is: how can I modify the above command for the use of multiple events per subject when the optionid is used for indicating the subject?

The dataset look like:

data  | exercisedate | itm    | posret  | negret | optionid| exercise | time
1996  | 1996         | 1.4518 | 0.05487 |-0.4485 |    1    |   0      |   1
1997  | 1997         | 2.4535 | 0.00385 |-0.2525 |    1    |   1      |   5
1998  | 1998         | 1.2523 | 0.04486 |-0.1482 |    2    |   1      |   8
1999  | 1999         | 3.4257 | 0.15287 |-0.8615 |    3    |   0      |   4
2000  | 2000         | 1.1457 | 0.07487 |-0.5485 |    3    |   1      |   5
2001  | 2001         | 2.4418 | 0.09553 |-0.3772 |    3    |   0      |   2


Thank you,

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 Mon 28 Apr 2008 - 08:48:36 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 Mon 28 Apr 2008 - 09:30:34 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