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
Correlation matrixHello, I would like to do the correlation matrix between variables P_1, P_5, P_10 P_15, F_1, F_5, F…
A small clarification!I produce here two codes with a slight difference that produce the same output. These codes are base…
Reshape long with multiple values in iHi all, I want to reshape my data from Code: * Example generated by -dataex-. For more info, type …
join month and day in a single date variableDear all, I have a variable that corresponds to month in the format "2012m1" and a variable that co…
Interpretation of testparm after missing F valuesHi all, After adding clustered standard errors to my probit model, the F values were missing. After…
Subscribe to:
Post Comments (Atom)
0 Response to Using rangestat when there are gaps in the date identifier
Post a Comment