I have an unbalanced panel data of mutual funds data from 1981 to 2013 with monthly observations of their returns. I am trying to estimate betas with a rolling regression. The betas should be estimated on the excess return exret
and market premium rmrf
from the previous 12 months. Therefore I want to use rollreg
command to estimate these betas and alphas. My problem is that there is missing values in exret
or rmrf
variables (although the id and time variables are non missing) and Stata doesn't run the regression.
My code is as follow:
tsset wficn date
rollreg exret rmrf, move(12) stub(retM12)
When I run this I receive the following message:
Number of gaps in sample: 542
Observations with preceding time gaps
...
...
...
sample may not contain gaps r(198);
Could someone help me ?