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
Related Posts with "Asreg" rolling window regressions with monthly data
Create a new variable from existing variables where the categories are not mutually exclusiveHi, I am trying to create a new variable adv_outcome. I have 5 pre-existing variables I am interest…
Saving the coefficients of the time fixed effect and averaging itDear Statalists, I would like to make out of sample predictions based on a two way fixed effect mod…
"0 (empty)" during logistic regressionDear Forum, I am having a problem with a logistic regression that uses an interaction variable, dum…
Residuals non-normalHi everyone, I am running into a problem when running an LSDV model. My residuals are non-normal (I…
Generate a list of unique firmsHi, I have a panel data and would like to generate a list of unique firms (e.g. gvkey), preferable e…
Subscribe to:
Post Comments (Atom)
0 Response to "Asreg" rolling window regressions with monthly data
Post a Comment