Dear Stata Specialists,
I have a daily panel data from 01/01/2012 to 12/31/2017 with 10 different regions.
I would like to generate two variables that represent 7 days the average.
For example below based on Excel,
Cell D9 = average (C3:C9), this value is the average rate for 7 days from 01/02/2012 to 01/08/2012).
Cell E9 = average (C2:C8), his value is the average rate for 7 days from 01/01/2012 to 01/07/2012).
Since I have 10 different regions (Region 1-10), it is really difficult to calculate the average manually in Excel.
I would like to generate those columns D and E in STATA based on STATA code.
Could you please help me on the code?
Thank you very much in advance.
Array
Related Posts with Command for Calculating the Average for 7 days periods in Panel Data
Computing predictive margins (mimrgns) for gsem with random effectsDear Statalisters, I would much appreciate your help with the following problem: I am not able to …
Dropping observations based on multiple conditionsHi. I am pasting a sample of the date of I am working with: Code: * Example generated by -dataex-.…
generating household size variableI'm using Household Income Expenditure Survey data for a research. But there is no variable called H…
Multiple Imputation on Panel Data - Error regarding variance-covariance matrix (EM did not converge)Dear All, I am tackling my thesis and i have panel data on around 150 companies between the years 2…
code for testing of multiple unknown structural breaksI´m using stata 16 with windows 10 OS. I want to identify multiple structural break of unknown date…
Subscribe to:
Post Comments (Atom)
0 Response to Command for Calculating the Average for 7 days periods in Panel Data
Post a Comment