Dear Statalist users,

I have monthly time series data on flight_delays per air_carrier. For each air_carrier (uniquely identified by date and carrier identifier), I want to compute the rolling sum of delays across the past 5 months (from t=0 until t=-5).

I was looking into tsegen but did not figure out how to solve the issue that tsegen does not allow for bysort.

It would be really kind if someone could help me with this, I have been trying to find a solution for this all morning.

Thanks

Christian