Hi Statalist.

I am using survival analysis to analyse the time-to-an-event (relationship failure). Each person becomes at risk (of failure) from the time they enter into a relationship with someone else, and this is shown by a variable 'begin' (when begin == 1) in the year this occurs. Relationship failure is shown by a break-up (end == 1) in the year this occurs. I am working with panel data so have multiple observations for each individual (in a couple) and each individual has an ID (I used -group()- to create a couple ID).

My panel data set contains observations that are right-censored (where the event did not occur over the survey period or due to a subject not continuing with the survey) and left-truncated (where two individuals were already a couple (and therefore 'at risk') prior to the first wave of the survey).

I originally had:
Code:
stset seq, id(couple) failure(end==1) enter(begin==1 exit(time .)
however, after reading over Ch 6 of "An Introduction to Survival Analysis using Stata" and https://www.stata.com/support/faqs/statistics/stset-spell-type-data/ again, I felt it was important to include time0() and origin() and revised to:
Code:
stset seq, id(couple) failure(end==1) time0(begin) origin(begin==1) exit(time .)
I would appreciate advice on whether either of these -stset- commands are correct, if so, which is best, if not, suggestions and comments are appreciated.

Note: 'seq' is the sequence of years that a couple is together, increasing from 1 in the wave they first become a couple.

Stata v.15.1.