Hi,
I am working with panel data organized by patient ID (id) and date of assessment (date). Unfortunately, some discharge assessments (type) took place on the same day as the admission assessment, hence I have repeated time values in my panel data. I've been able to visually confirm that the admission assessments are generally more complete for my two main variables of interest using the command below.
browse id date type var1 var2 if (id == id[_n-1]| id == id[_n+1]) & (date == date[_n-1] | date ==date[_n+1])
I now want to force Stata to drop the discharge assessments when id and date are duplicates, but I cannot get this to work. Help?
I know that I am throwing away information, but I see no better option and I have 2.5 million IDs.
Thank you,
Emma
I am working with panel data organized by patient ID (id) and date of assessment (date). Unfortunately, some discharge assessments (type) took place on the same day as the admission assessment, hence I have repeated time values in my panel data. I've been able to visually confirm that the admission assessments are generally more complete for my two main variables of interest using the command below.
browse id date type var1 var2 if (id == id[_n-1]| id == id[_n+1]) & (date == date[_n-1] | date ==date[_n+1])
I now want to force Stata to drop the discharge assessments when id and date are duplicates, but I cannot get this to work. Help?
I know that I am throwing away information, but I see no better option and I have 2.5 million IDs.
Thank you,
Emma
Comment