I have two datasets that I have to join using time condition. I was
thinking of -joinby- but it doesn't seem to have an -if- option (?).
I've looked into Stata manual and list archive but even if the answer is
there I don't recognise it.
Dataset 1 has variables:
id start_date1 end_date1 sum1
Dataset 2 has variables:
id start_date2 end_date2 sum2
I need to join/merge these files by variable id and a condition:
start_date1<=start_date2 & end_date1>=end_date2