Dear All,
I have a panel dataset and I would like to “rolling” regress my dependent variable on a main variable of interest (plus several controls).
Just to give you more details, my id variable is represented by a numerical code which also proxies for geographical distance. Then, in order to account for spillover threats, I would like to regress the dependent variable of each id unit i on the main control ranging in an interval i - n, i + n, unit i included as well, over the time dimension of my sample.
I tried to use the rolling command, but actually I did not figure out a proper way to deal with this question.
Any suggestion?

Many thanks in advance.

Best regards,
Pasquale Giacobbe