Wednesday, March 3, 2021

How to flag an event of interest in a longitudinal dataset

Hi,

I have a hospital admission data in which every patient may have one to hundreds of repeated admissions. I want to create a variable to indicate me when patients have certain types of causes of admission identified by ICD codes, for instance ICD1, ICD2, ICD3. I am not sure if I should be using looping or something else.

I would be grateful to get any help.

Thank you,
Befikadu

No comments:

Post a Comment