Dear Stephen Jenkins,

I'm following your Survival Analysis guideline (https://www.iser.essex.ac.uk/resourc...sis-with-stata) and An Introduction to Survival Analysis Using Stata by Cleves et al. (2008).

I would like to ask your help about transforming panel data to duration data. I have a panel data with monthly observations of individuals' depression status. My research question is how individual characteristics affect the duration of depression stage. The problem is when I use the snapspan command, I could not control interval truncation in the data and missing observations counted as they were observed.

Current format of my data for individual A is:

Code:
     +------------------------+
     | month   event   gender |
     |------------------------|
A. |     1       0   Female |
A. |     6       0   Female |
A. |     8       1   Female |
A. |     9       1   Female |
A. |    10       1   Female |
     +------------------------+
For individual A month shows the month of interview, event=1 if individual depressed in this month, gender is one of the individual characteristics. As you can see I only observe individual A in January, June, August, September and October, while she missed the other 7 interviews. When I use the snapspan command

Code:
snapspan individualidsys month event, gen(date0) replace
rename month date1
The transformed data became:

Code:
     +--------------------------------+
     | date0   date1   event   gender |
     |--------------------------------|
A. |     .       1       0        . |
A. |     1       6       0   Female |
A. |     6       8       1   Female |
A. |     8       9       1   Female |
A. |     9      10       1   Female |
     +--------------------------------+

In the duration data it seems like I observed the individual A from month 1 (January) to month 6 (June) and from month 6 to month 8 which are not the case. My questions:

1) Would that be a problem, if so how should I fix the missing observation problem in transforming the data?
2) I'm planning to use following stset command
Code:
stset date1, id(id) time0(date0) failure(event==1)
do I need to define enter, exit or origin options in case of multiple failures?

Best regards,
John