| |
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
st: Competing Hazards with Multiple-Record-per-Subject Data
From |
Alexander Gelber <[email protected]> |
To |
[email protected] |
Subject |
st: Competing Hazards with Multiple-Record-per-Subject Data |
Date |
Fri, 15 Sep 2006 16:58:35 -0400 (EDT) |
In earlier Statalist posts, May Boggess of Statacorp explained how to
estimate a competing hazard model using Lunn and McNeil's methods A and
B. There seems to be a problem, however, with implementing Lunn and
McNeil's Method B when using multiple-record-per-subject data.
The problem is that to implement Lunn and McNeil Method B, you need to
duplicate each subject's record twice (in the case of two competing
hazards). In the case of multiple-record-per-subject data, when using the
stset command to stset the data, you need to specify the ID variable using
id(idname), where "idname" is the name of the ID variable. But then Stata
gives you an error message, because each ID has two records attached to it
at every instant, and the stset command with multiple-record-per-subject
data only works correctly when there is only one record for each id-time
combination.
For example, in my case, the time variable is "month," the failure
variable is "status," and the id variable is "id," and here is what
happens when I try to stset my data:
. stset month, failure(status) id(id)
id: id
failure event: status != 0 & status < .
obs. time interval: (month[_n-1], month]
exit on or before: failure
------------------------------------------------------------------------------
2000 total obs.
2000 multiple records at same instant PROBABLE ERROR
(month[_n-1]==month)
------------------------------------------------------------------------------
0 obs. remaining, representing
0 subjects
0 failures in single failure-per-subject data
0 total analysis time at risk, at risk from t = 0
earliest observed entry t = .
last observed exit t = .
Does anyone know how to address this problem? Any help would be much
appreciated.
Alex
--
Alexander Gelber
Ph.D. Candidate
Harvard University Department of Economics
Littauer Center
Cambridge, MA 02138
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/