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
Related Posts with Computing rolling lagged sums with bysort
Calculating difference between observations in a panel with missing valuesHello! I am working with online auction data (see -dataex- below), where id is the listing identifi…
Converting R date into STATA dateHi, I am trying to convert R dates into STATA dates but unable to do so. For example, the R date i…
poisson regression with instrumental variables and high dimensional fixed effectsI have a poisson regression model with large number of fixed effects and an endogenous independent v…
calculate averages of groups of observations separated by groups of missing observationsHi everybody, I have panel data with a few variables that have a somewhat random pattern. I need to…
Mark all observations that has one variable in commonHello, I'm quite new to stata. I have searched in this forum, but can not find the answer I need, th…
Subscribe to:
Post Comments (Atom)
0 Response to Computing rolling lagged sums with bysort
Post a Comment