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
Confused whether to use first difference variables when testing between modelsI am conducting research on panel data where N=16 and T=24. After conducting panel unit root tests I…
What does mean the error 'Invalid 'Bastos'?I am trying using flexpaneldid and glmdose commands in stata but I cannot run. Always the message In…
Problem: Independent variable is somewhat dependent on dependent variableDear all, so far I have been a read-only member and have several times profited greatly from your kn…
Plotting probability trees to model path dependenceDear members, is there a command that allows to draw a probability tree in Stata? I have a panel d…
Block bootstrap codes for time series dataI'm looking to do OLS regression for time series data but there is potentially serially correlated e…
Subscribe to:
Post Comments (Atom)
0 Response to Command for Calculating the Average for 7 days periods in Panel Data
Post a Comment