# st: Incidence calculation for multiple events in longitudinal studies

 From James Cui To statalist@hsphsun2.harvard.edu Subject st: Incidence calculation for multiple events in longitudinal studies Date Thu, 02 Jun 2005 10:12:14 +1000

```Dear Statalist:

I try to calculate the incidence of a multiple event in a longitudinal
study and searched the literature and found no specific method to
address this problem. Perhaps I have missed something here. Does anybody
know some references for this topic?

I made up an artificial example as follows, where the "disease" variable
indicates the recurrent event, which is positive at the baseline and at
the visits 1,4 and 5. The variable "intdate" is the interview date.

+----------------------------------------------+
| id   visit   disease    baseline     intdate |
|----------------------------------------------|
1. |  1       0         1   01 Jan 00   01 Jan 00 |
2. |  1       1         1   01 Jan 00   01 Jan 01 |
3. |  1       2         0   01 Jan 00   01 Jan 02 |
4. |  1       3         0   01 Jan 00   01 Jan 03 |
5. |  1       4         1   01 Jan 00   01 Jan 04 |
6. |  1       5         1   01 Jan 00   01 Jan 05 |
+----------------------------------------------+

Then I -stset- the data and try to calculate the person-years for each
visit with -stptime-:

stset intdate, failure(disease) origin(time baseline) id(id) exit(time .)
stptime, by(visit)

I got the result:

id:  id
failure event:  disease != 0 & disease < .
obs. time interval:  (intdate[_n-1], intdate]
exit on or before:  time .
t for analysis:  (time-origin)
origin:  time baseline

------------------------------------------------------------------------------
6  total obs.
1  obs. end on or before enter()
------------------------------------------------------------------------------
5  obs. remaining, representing
1  subject
3  failures in multiple failure-per-subject data
1827  total analysis time at risk, at risk from t =         0
earliest observed entry t =         0
last observed exit t =      1827

failure _d:  disease
analysis time _t:  (intdate-origin)
origin:  time baseline
exit on or before:  time .
id:  id

visit |  person-time   failures        rate   [95% Conf. Interval]
-----------+-----------------------------------------------------------
1 |          366          1   .00273224   .0003849    .0193964
2 |          365          0           0          .           .
3 |          365          0           0          .           .
4 |          365          1   .00273973   .0003859    .0194495
5 |          366          1   .00273224   .0003849    .0193964
-----------+-----------------------------------------------------------
total |         1827          3   .00164204   .0005296    .0050912

I think the result is not quite right for the 1st visit and the 5th
visit because this subject changes from positive to positive. So at
these two visits the subject is not an incident case. Also I concerned
the calculation of the person-years. The follow-up period from baseline
to visit 1 (and from visit 4 to visit 5) should not be included in the
person-year calculation.

--
James Cui, PhD MMed BSc (Stats)
Senior Research Fellow
Department of Epidemiology & Preventive Medicine
Monash University
Alfred Hospital Campus, 89 Commercial Road
Melbourne, Victoria 3004
Australia
Tel: 990 30570
Fax: 990 30556
Email: James.Cui@med.monash.edu.au

*
*   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/
```