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
How to organize a dataset in order to have years in one column and countries in another columnHello, I import data (related to one single variable "stringency" in excel to stata. However it app…
Retaining the entire ID if there are certain variables in the panel dataGood Morning world English is not my language so google help me. Please understand me. I have stat…
Random effects: logit with ibn. vs melogitI would like to model the predictors of remaining married (dichotomous) in a variety of countries (c…
How can I generate a column of numbers with an interval of 3?Dear all, How can I generate a column of numbers with an interval of 3?Just like the example, Code:…
Replacing missing values with draws from a subset of nonmissing valuesI am replicating an imputation procedure for a household survey, and I'm struggling to find a elegan…
Subscribe to:
Post Comments (Atom)
0 Response to Computing rolling lagged sums with bysort
Post a Comment