Recurrent analysis survival analysis data format question

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Recurrent analysis survival analysis data format question

Bob Green
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

______________________________________________
[hidden email] 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.
Reply | Threaded
Open this post in threaded view
|

Re: Recurrent analysis survival analysis data format question

Andrews, Chris
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:[hidden email]]
Sent: Tuesday, June 10, 2014 2:32 AM
To: [hidden email]
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

______________________________________________
[hidden email] 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.
Reply | Threaded
Open this post in threaded view
|

Re: Recurrent analysis survival analysis data format question

John Kane
Hi Chris,
 Why would you not consider the person at risk for re incarceration if he is currently imprisoned?

Symantically I'd agree, he or she is already behind bars.  But from the point of view of extra sentences it is quite possible to commit an offence while in prision and recieve another sequential sentence.  

We have a current case here where three people, already incarcerated, are just been charged with attempted murder.

John Kane
Kingston ON Canada


> -----Original Message-----
> From: [hidden email]
> Sent: Tue, 10 Jun 2014 19:02:30 +0000
> To: [hidden email]
> Subject: Re: [R] Recurrent analysis survival analysis data format
> question
>
> 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:[hidden email]]
> Sent: Tuesday, June 10, 2014 2:32 AM
> To: [hidden email]
> 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
>
> ______________________________________________
> [hidden email] 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.

____________________________________________________________
Publish your photos in seconds for FREE
TRY IM TOOLPACK at http://www.imtoolpack.com/default.aspx?rc=if4

______________________________________________
[hidden email] 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.
Reply | Threaded
Open this post in threaded view
|

Re: Recurrent analysis survival analysis data format question

Andrews, Chris
Hi John,
That must be in Canada, where everyone is a thug, unlike here in the US.  :-)

But seriously, you make a good point.  I guess it depends on what the event variable is: commission of a new crime, start of a new sentence, reincarceration after a period of freedom, etc. (and what data Bob has).  If a person is found guilty of two crimes (e.g. two robberies in a single spree) and the jail terms are to be served consecutively, is that one event or two?

Chris

-----Original Message-----
From: John Kane [mailto:[hidden email]]
Sent: Wednesday, June 11, 2014 9:13 AM
To: Andrews, Chris; Bob Green
Cc: [hidden email]
Subject: Re: [R] Recurrent analysis survival analysis data format question

Hi Chris,
 Why would you not consider the person at risk for re incarceration if he is currently imprisoned?

Symantically I'd agree, he or she is already behind bars.  But from the point of view of extra sentences it is quite possible to commit an offence while in prision and recieve another sequential sentence.  

We have a current case here where three people, already incarcerated, are just been charged with attempted murder.

John Kane
Kingston ON Canada


> -----Original Message-----
> From: [hidden email]
> Sent: Tue, 10 Jun 2014 19:02:30 +0000
> To: [hidden email]
> Subject: Re: [R] Recurrent analysis survival analysis data format
> question
>
> 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:[hidden email]]
> Sent: Tuesday, June 10, 2014 2:32 AM
> To: [hidden email]
> 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
>
> ______________________________________________
> [hidden email] 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.

____________________________________________________________
Publish your photos in seconds for FREE
TRY IM TOOLPACK at http://www.imtoolpack.com/default.aspx?rc=if4


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

______________________________________________
[hidden email] 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.
Reply | Threaded
Open this post in threaded view
|

Re: Recurrent analysis survival analysis data format question

Bob Green
Hello Chris,

Thanks. This is not as straight forward as it seems.

Given an index release date, I have dates of prior and subsequent
imprisonment, offending that results in re-incarceration and hospital
admission dates, pre and post.

There are some additional complexities, such as people released from
custody straight to a psychiatric hospital, and transfers the other way,
which can inflate the recidivism rates.

Regards

Bob


> Hi John,
> That must be in Canada, where everyone is a thug, unlike here in the US.
> :-)
>
> But seriously, you make a good point.  I guess it depends on what the
> event variable is: commission of a new crime, start of a new sentence,
> reincarceration after a period of freedom, etc. (and what data Bob has).
> If a person is found guilty of two crimes (e.g. two robberies in a single
> spree) and the jail terms are to be served consecutively, is that one
> event or two?
>
> Chris
>
> -----Original Message-----
> From: John Kane [mailto:[hidden email]]
> Sent: Wednesday, June 11, 2014 9:13 AM
> To: Andrews, Chris; Bob Green
> Cc: [hidden email]
> Subject: Re: [R] Recurrent analysis survival analysis data format question
>
> Hi Chris,
>  Why would you not consider the person at risk for re incarceration if he
> is currently imprisoned?
>
> Symantically I'd agree, he or she is already behind bars.  But from the
> point of view of extra sentences it is quite possible to commit an offence
> while in prision and recieve another sequential sentence.
>
> We have a current case here where three people, already incarcerated, are
> just been charged with attempted murder.
>
> John Kane
> Kingston ON Canada
>
>
>> -----Original Message-----
>> From: [hidden email]
>> Sent: Tue, 10 Jun 2014 19:02:30 +0000
>> To: [hidden email]
>> Subject: Re: [R] Recurrent analysis survival analysis data format
>> question
>>
>> 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:[hidden email]]
>> Sent: Tuesday, June 10, 2014 2:32 AM
>> To: [hidden email]
>> 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
>>
>> ______________________________________________
>> [hidden email] 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.
>
> ____________________________________________________________
> Publish your photos in seconds for FREE
> TRY IM TOOLPACK at http://www.imtoolpack.com/default.aspx?rc=if4
>
>
> **********************************************************
> Electronic Mail is not secure, may not be read every day, and should not
> be used for urgent or sensitive issues
>
>

______________________________________________
[hidden email] 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.