Hi everyone:
I have a question regarding the asreg command written by @Attaullah Shah. Since I am an absolute beginner and new in this forum, my first question is: Is it possible to estimate rolling window regressions with that command for data that is reported monthly?
I tried running a few example regressions with that command (daily data which if found online) - it worked perfectly well within an impressively short amount of time. My own data, however, is an unbalanced panel monthly data set structured in the long format in Stata.
My original date variable looks like follows: 201501, 201502, 201503, and so forth. Beyond that I have a clear Identifier variable for my panel structure and variety of further variables.
I created my monthly date variables by using the numdate command:
numdate monthly mdate = _date, pattern(YM) topyear(2050)
By doing this, my data looks like: 2015m1, 2015m2, 2015m3, and so forth.
When running the asreg command, all regression estimates are missing values:
bys Identifier: asreg Y X1 X2 X3, wind(mdate 12)
For each Identifier, there is more than 10 years of monthly data available. So my aim was to calculate for each Identifier regression results that are based on one year of monthly data for each point in time (month).
Any suggestions are greatly appreciated. Thank you for your help in advance!
Best,
Dennis
0 Response to "Asreg" rolling window regressions with monthly data
Post a Comment