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
sampleQuery …
Insufficient observations with bsrifhdregHello, I was trying to conduct quantile regressions with fixed effects using the following command …
Analysis of multiple outcome measurements with censored dependent variablesOur working group has a data set that contains about 10 measured urinary pesticides or their metabol…
Graph legend(off) does not work Hello, I have health expenditure data for 20 countries covering 1971-2019 which looks like below. …
Mismatch between date formatted as string and numeric dateDear all, I am processing hourly time series data (DD.MM.YYYY hh:mm), where the date variable is fo…
Subscribe to:
Post Comments (Atom)
0 Response to Command for Calculating the Average for 7 days periods in Panel Data
Post a Comment