Rewritten long-term script to use data of both cohorts indexed by days from start of RI