For each individual in my dataset I have two date variables (date1 and date2). I then have a series of date ranges that I'm interested in (i.e. 5/15-7/14; 7/15-9/14 etc.). I would like to have Stata produce a a yes/no variable for each range of dates that tells me if the range of dates falls within the range of date1 and date2 (Does a range of dates fall within a range of another dates). I have data over two years, but the year is not important for this particular case.
I was able to have Stata tell me if one date falls within a range of dates using the inrange command, but did not have further success. If anyone has an idea how to do this, I would greatly appreciate the help!
I was able to have Stata tell me if one date falls within a range of dates using the inrange command, but did not have further success. If anyone has an idea how to do this, I would greatly appreciate the help!
Comment