ID Date amt Month Month1(Desired Month) 2 30MAY2019 700 MAY MAY 2 01JUL2019 700 JUL JUN 2 30JUL2019 700 JUL JUL 2 30AUG2019 700 AUG AUG hypothesis I want to prove: for every ID there are 4 transactions with similar amount in 4 consecutive months (MAY,JUN,JUL,AUG). now there are cases above, where for second observation where date is 01JUL2019 the month is JUL right? but I want to make it JUN. because the first observation is of 30MAY2019, so if date of next observation lies between -5DAYS <30JUN2019< +5DAYS, in this case 01JUL2019 falls in between this condition so the Month1 should be changed to JUN instead of JULY. Got my question? let me know. thanks.
... View more