Hi everyone,
I am new to stata and have a basic question. I have the following data about days at which a patient visited the hospital.
Patient 1: days 4, 5, 6, 8, 9, 11, 12, 13,14, 15,
Patient 2: days 8, 9, 10, 14, 15, 16, 17, 19, 20
I want to generate a new column with longest streak of consecutive days for each patient. How could I go about doing this?
Thank you in advance!
I am new to stata and have a basic question. I have the following data about days at which a patient visited the hospital.
Patient 1: days 4, 5, 6, 8, 9, 11, 12, 13,14, 15,
Patient 2: days 8, 9, 10, 14, 15, 16, 17, 19, 20
I want to generate a new column with longest streak of consecutive days for each patient. How could I go about doing this?
Thank you in advance!
Comment