The symptoms are evaluated from day 1 to day 10. Where for the first 3 days symptoms are evaluated thrice (morning, afternoon and evening) and from day 4 to day 10 symptoms are evaluated twice(morning, evening). So there are datasets for symptoms day1-3 data's(morning, afternoon and evening) day1-3 data's(morning, afternoon and evening) day1-3 data's(morning, afternoon and evening) day4 -2 data (morning, evening) ' . day 10- 2 data's (morning, evening) So total there will be 23 data sets. I have created a flag variables for each day for each time point (morning, afternoon and evening) for day 1 to 3 and (morning, evening) from day 1 to 10. So there a a total of 23 flags when i merge all those together. After that I was trying to create a final flag as I have mentioned above if flag1m="No" or flag1a="No" or flag1e="No" then day=1; else if flag2m="No" or flag2a="No" or flag2e="No" then day=2; and so on till day 10. Here No means symptoms is resolved and yes means the subject still has symptoms. i am mainly interested in the No part. This code works perfectly fine when and I get the correct day for symptoms resolved but few subjects get the symptoms again once it get resolved. For those subjects the day for symptoms resolved gets wrong as it considers the first day day for the symptoms to get resolved even though the symptoms occurs again for the subject . It wont consider the final day for the symptoms to get resolved for those subjects
... View more