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
Composite IndexHi! I am trying to generate a composite index for 2 numerical variables. what is the best way to do …
Sample size & power for quantile regressionHello, For a clinical trial using quantile regression to test the null hypothesis, could anyone adv…
Three-level mix-effect model for ordered logistic regression in Stata- meologit regressionDear all, I am currently working with a cluster data collected from 3229 respondents in 40 counties…
DID (Differences-in-difference) regressionDear All, I’m having a problem with DID regression equation. I am using Stata 12. when I ran the re…
Correlation PbHello, I am pretty new to Stata and econometrics in general so please excuse me if my question seem…
Subscribe to:
Post Comments (Atom)
0 Response to Using rangestat when there are gaps in the date identifier
Post a Comment