Announcement

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

  • ICD10 longitudinal Data

    Hello All,
    I am using STATA 15.1 and working with a longitudinal data looks like the following:
    * Example generated by -dataex-. To install: ssc install dataex
    clear
    input byte pid str3 icd10x byte Diag_age str2 Quarter
    1 "E11" 45 "Q1"
    1 "F32" 35 "Q1"
    1 "G40" 20 "Q4"
    1 "T40" 30 "Q2"
    2 "T78" 22 "Q1"
    2 "G40" 11 "Q2"
    2 "F99" 40 "Q3"
    2 "E11" 50 "Q4"
    3 "F32" 55 "Q1"
    3 "F92" 60 "Q2"
    3 "G40" 17 "Q1"
    end
    where pid is the patient id, icd10x: diagnosis, Diag_age: age at diagnosis; Q1: the quarter in which there was an encounter with patient. I am trying to have the data in the wide form and creating a variable for each diagnosis and link it with the age at diagnosis and the quarter of the encounter. Thank you.
Working...
X