Hi,
I am trying to use rangestat to perform rolling regressions over a data panel. My data correspond to daily observations as of Friday of each week. Dates are formatted as daily (%td). This is the command I am using:
xtset ticker date_end, delta(7)
rangestat (reg) excess_ret excess_mkt anomaly, interval(date_end -260 0) by(ticker)
Looking at the results of this command, I find that the number of observations in the regressions is equal to 38, which roughly matches 260/7. I also realize that changing the interval to 1820 (which is equal to 260 * 7) give 260 observations in each regression. However, I am not sure if this aproximation is right.
I also tried to format the dates to weekly (%tw), but this creates repeated values within groups. Also, I tried creating an index 1,...,n, to identify weeks, but this seems problematic since I also have gaps in my data.
I would like to know if there is any way to correctly format the dates to get the results I want without having to approximate the size of the interval.
Thanks.
Related Posts with Using rangestat when there are gaps in the date identifier
How can I find out how Stata is calculating covariance matrices exactly(!)I'm trying to translate Stata results into R and with the existing methods, I can only recreate stan…
How to construct the second best response to a shock?Hi, I am using a household survey wherein I have been given money raised from top 5 sources in time…
Heteroskedasticity and MulticollinearityWhen I use the command (estat hettest) after doing the panel regression with re and fe then hausman …
Exporting Regression Results with 6 decimal pointsHello, I can export regression results in stata, but I was wondering how to export regression result…
Ratio of frequency of two variablesHello I have a dataset like this: Code: * Example generated by -dataex-. To install: ssc install da…
Subscribe to:
Post Comments (Atom)
0 Response to Using rangestat when there are gaps in the date identifier
Post a Comment