[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: Interval censored survival and stpm or intcens

From   Steven Samuels <[email protected]>
To   [email protected]
Subject   Re: st: Interval censored survival and stpm or intcens
Date   Fri, 7 Sep 2007 14:05:26 -0400

------------------------------------------------------------------------ ---------

As you haven't responded, we don't know what error -stpm- issued. You may not have defined the "leftvar" properly. Or, with only interval data and a small number of intervals, -stpm- may not have enough information to fit its flexible spline models. In that case, you must use -intcens-, which fits parametric models. I suggest that you fit all of the parametric models. If -intcens- supports postestimation commands, you can compare the models with the Schwartz BIC statistic (-estat ic-). Otherwise, compute BIC by hand.

Another option is Stephen Jenkin's program -pgmhaz8- for grouped proportional hazards data, available from SSC.


Following is code which will convert your data to a form that - intcens- can use.

/*************************CODE FOLLOWS ***************/

drop _all
set more off
capture log close
log using sharon01, replace text

input id month status
1 0 0
1 6 0
1 12 1
2 0 0
2 6 0
2 12 0
2 18 1
3 0 0
3 6 0
3 12 0

/* First identify people with event */
egen event=max(status), by(id)
tempfile temp0
save `temp0'

/* Intervals for people with events */

/* Start of interval */
keep if status==0 & event==1
bysort id (month): keep if _n==_N
rename month t0
tempfile temp1
save `temp1'
list id status event t0 t1

/* End of interval */
use `temp0',clear
keep if status==1
bysort id (month): keep if _n==1
rename month t1
merge id using `temp1'
tab _merge
drop _merge
tempfile temp3
save `temp3'

/* Censored observations- no events */
use `temp0'
keep if event==0
egen t0=min(month), by(id)
bysort id: keep if _n==1
gen t1=.
drop month

/* Final data */
append using `temp3'
sort id
list id t0 t1

On Sep 7, 2007, at 12:42 AM, Sharon Minnick wrote:


I have been attempting to analyze my interval censored survival data with either stpm or intcens ado's (From SSC). Both programs have been used in published papers (stpm: Royston and Parmar 2002; intcens: Griffin et al 2006). However, unless I am missing something, they don't seem able to handle multiple records per subject. In my study, subjects are bled and their serology checked at 6 month intervals. I want to be able to use the intervals when they were negative (and at risk) as well as the interval ending in seroconversion (or censoring) and I don't want to make only one interval per subject where some intervals will then be 2 or 3 years long. Does anyone have experience using either of these ado's in such a situation?
My data is in the span format with multiple records per subject. For each subject, _t0 is the first date of the span and _t is the second date of the span. There are no gaps, so _t for the first span is equal to _t0 for the second span.

In the intcens ado, the interval is specified as t0 and t1, there is no subject identifier. Intcens does not use stset parameters so I would lose some of the structure of my data.

For stpm, I have tried to define the left variable to specify that the observations are interval-censored by using _t0 as the left variable (which is < _t so according to the help file, when _d is 0, this will specify late entry at _t0 and right censoring at _t and when d is 1, this will specify interval censoring with an event in [_t0, _t]. I always receive the error message "

If anyone has used these ado files with interval censored data with multiple records per subject, I would appreciate a note as to whether or not it worked (and how to set it up).


Sharon Minnick
University of California at Davis

* For searches and help try:
Steven  Samuels

[email protected]
18 Cantine's Island
Saugerties, NY 12477
Phone: 845-246-0774
EFax: 208-498-7441

*   For searches and help try:

© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index