Hello:

I am a new user and I am wondering if there a way in Stata to create a lagged variable that covers a range of time?

I have a dataset of daily observations of violence between two countries across a disputed border. What I’m interested in looking at is whether there is any relationship between the local patterns of violence and international political events. So, for example, do we see a spike in violence +/ -5 days around a meeting of the UN General assembly or the arrival of an international delegation to the disputed region, etc.?

I understand how to make “point“ leading and lag variables (-1 day, -2 days, -3 days) but I’m less interested in knowing if we see peaks of violence specifically three days after such a meeting than if we see them at any time in five days before or after.

I know that this can be coded using “brute force” manual methods, but I am hoping there is some kind of way to do it via the software.

Thank you in advance!