[R] Recurrent analysis survival analysis data format question

Andrews, Chris chrisaa at med.umich.edu
Tue Jun 10 21:02:30 CEST 2014


I wouldn't consider the person at risk for re incarceration if he is currently imprisoned.  So I wouldn't use those intervals as part of the response variable.  Perhaps time in custody would be a covariate used to model the time until re incarceration.  One variable that is commonly needed for analysis of recurrent data is the number of previous events.  It can be used to, e.g., stratify.

Chris


-----Original Message-----
From: Bob Green [mailto:bgreen at dyson.brisnet.org.au] 
Sent: Tuesday, June 10, 2014 2:32 AM
To: r-help at r-project.org
Subject: [R] Recurrent analysis survival analysis data format question

Hello,

I'm hoping for advice regarding how to set up a recurrent event 
survival analysis data file. My data consists of people released from 
custody, with survival time being measured as days before re 
imprisonment or end of the study. In the example below, id 5155 is 
released 5 times and jailed five times. All events are therefore 
true. Daysfree is the difference in days between release and return 
to custody.  Id 7155 is released 3 times and only re-imprisoned 
twice, so the third event value is false.

id <- c(5155, 5155,5155,5155, 7155, 7155,7155)
Release <- c("29/10/10","9/01/11", "25/03/12", "15/10/13", "9/01/10", 
"16/12/12","29/10/13")
JailNew <- c("1/12/10","01/12/11", "27/09/12", "24/01/14", 
"22/09/12","24/01/12","24/01/14")
DaysFree <- c(24,234,134,74,709,29,64)
Event <- c("true", "true", "true", "true", "true", "true", "false" )
DF1<- data.frame(id,  Release, JailNew, DaysFree, Event)
DF1

  After speaking to a statistician today I'm not sure if I my method 
of formatting the data is correct. Should all time intervals be 
included, not just the period from release to event/end of study 
period.  Currently period imprisoned is not counted.  For example, 
for id 5155, would I also include  1/12/10 - 9/01/11 etc, which would 
be FALSE for event and have a duration of 39 days; and then include 
all the other similar intervals as well. The statistican thought 
including this additional information more closely resembled the 
bladder1 data in the Survival package.

Any assistance is appreciated,

Regards

Bob


**********************************************************
Electronic Mail is not secure, may not be read every day, and should not be used for urgent or sensitive issues 



More information about the R-help mailing list