[R] Recurrent analysis survival analysis data format question
    Bob Green 
    bgreen at dyson.brisnet.org.au
       
    Tue Jun 10 08:31:30 CEST 2014
    
    
  
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
    
    
More information about the R-help
mailing list