This is relative month calculation. ID 1 has M1 in 01.2014(relative_month1 variable) and M2 in 02.2014. I grouped this in 201401 bucket ID 1 has M1 in in 02.2014(relative_month2 varibale) and M2 in 05.2014 - I grouped this in 201402 bucket So M2 can fall on any date but we are not showing it in the output. we are just showing when a particular patient has started and how many follow up's he has. I will give another example if 10 patients are satrting on 01.2014(M1) and out of the 10, 9 are coming back second time(can be on any date), I will flag the second instance as M2 and represent 9 in M2. In the input data the complication is our initiations can also happen in between the follow up period. same patient can have multiple initiation dates, ID 1 has initiation dates on 01.2014, 04.2014, 07.2014. our first initiation date is on 01.2014 when the follow up for this is M4, again the same ID is initiated also on 04.2014. Sorry if this is confusing. In the output I'm interested to show only the initiation date and the follow up's.
... View more