Announcement

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

  • #16
    Thanks Clyde for the response. so the period runs from the initial positive. The individual however need to have seroconverted to negative at some point so the second positive needs to count as a new infection
    (reoccurrence) that's why the 90 day period gap.

    Thanks also for the points you mentioned above. Duly noted.

    Thanks

    Comment


    • #17
      OK. Thanks for clearing that up. It necessitates a small change (bold face) in the code:

      Code:
      by unique_id (study_date), sort: egen first_pos = min(cond(pcr_result == "Positive", study_date, .))
      by unique_id (study_date): egen subsequent_neg = ///
          min(cond(pcr_result == "Negative" & study_date > first_pos, study_date, .))
      by unique_id (study_date): egen positive_again = ///
          min(cond(!missing(first_pos) & study_date >= 90 + first_pos & pcr_result == "Positive", ///
          study_date, .))
      format first_pos subsequent_neg positive_again %tdnn/dd/CCYY
      gen byte reoccurrence = !missing(positive_again)

      Comment

      Working...
      X