Hi,
I'm new to STATA - apologies if this query is too simple.
I have a large dataset in which each individual has numerous blood results, such as creatinine. I can tell the sequence of the creatinine values by a) the fact they are numbered eg "creat1" "creat2" and b) an associated time variable ("hrs_trop1_creat1") which tells me how many days before or after the first troponin value, that creatinine value was recorded.
I need to rename my creatinine values, such that creat0 is 0 hours from the first troponin, creat60 at 60 hours from first troponin, creat-24 at 24hours before the first troponin. Then I could get rid of the associated time variable.
Could someone suggest how I could do this please? I can't work out how to link the creatinine result with the corresponding time.
Thanks so much.
I'm new to STATA - apologies if this query is too simple.
I have a large dataset in which each individual has numerous blood results, such as creatinine. I can tell the sequence of the creatinine values by a) the fact they are numbered eg "creat1" "creat2" and b) an associated time variable ("hrs_trop1_creat1") which tells me how many days before or after the first troponin value, that creatinine value was recorded.
I need to rename my creatinine values, such that creat0 is 0 hours from the first troponin, creat60 at 60 hours from first troponin, creat-24 at 24hours before the first troponin. Then I could get rid of the associated time variable.
Could someone suggest how I could do this please? I can't work out how to link the creatinine result with the corresponding time.
Thanks so much.
Comment