Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • stset has a number of options, advice on which are key to test my time to event analysis?

    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 wave, 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: 'wave' is the wave of the survey and '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.
    Last edited by Chris Boulis; 16 Nov 2020, 23:34.

  • #2
    In my multiple-wave panel data (the data of which are sourced from an ongoing annual survey), I have 'left-truncated' data - those in a relationship prior to the start of the survey (or prior to entering the survey), and hence were 'at risk' prior to observation. I also have 'right-censored' data - those couples, that as of the last wave of data, have not yet failed (i.e. still in a relationship).

    To that end, are these settings correct?
    Code:
    stset cwave, id(couple) failure(end==1) origin(begin==1) exit(time .)
    'cwave' counts the years a couple is together. Lastly, would it make any difference changing enter(begin==1) with origin(begin==1) make any difference given 'begin' identifies when a couple first exists in the data? Comments are appreciated.

    Comment

    Working...
    X