Zeroing days (for 60 days) after disease detection
I have repeat measures where participants (by ‘site_specific’) were tested weekly for a disease. I have a cumulative day total and # of days since previous test (‘rolling_days’). Additionally I have a binary variable (‘disease_detection’) where 1 = disease detected. Finally, I have a ‘date’ variable that lists the day of disease_detection test.
My hopes are to 0 out ‘rolling_days’ everytime disease_detection = 1 and for the next 60 days, using data.
The approach could be to automatically 0 out the days or (2) create a Yes/no variable indicate a positive status and the next 60 days.