Announcement

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

  • Stset - identifying probable error help

    Hello STATAlist- I am new to this (STATA, statistics, survival analysis etc) and hoping that somebody can help me. I am working on survival analysis of a dataset where some patients have multiple records while others only have one. When I typed in stset command, I got an output saying that there was a probable error because multiple records at the same instant.

    What I would like to see is which records these are so that I can double check that this isn't a mistake in the data entry. Can someone recommend the code to list or identify these 2 records?
    Thanks,
    Anna
    . stset time, id(dogid) failure(outcome)
    id: dogid
    failure event: outcome != 0 & outcome < .
    obs. time interval: (time[_n-1], time]
    exit on or before: failure
    ------------------------------------------------------------------------------
    7787 total obs.
    2 multiple records at same instant PROBABLE ERROR
    (time[_n-1]==time)
    2645 obs. end on or before enter()
    1634 obs. begin on or after (first) failure
    ------------------------------------------------------------------------------
    3506 obs. remaining, representing
    2198 subjects
    1603 failures in single failure-per-subject data
    1276028 total analysis time at risk, at risk from t = 0
    earliest observed entry t = 0
    last observed exit t = 1115

  • #2
    After running stset there's a new variable called _st which is 1 in the observations flagged for inclusion, and 0 in those excluded. So you could have a look at those observations with _st==0. I would typically run list if !_st although in your case you have a lot of such excluded observations, so it might be worth having a look in the browser first (eg browse if !_st)

    Comment

    Working...
    X