Dear all,
I need some help in the following.
I need to run rolling regressions on monthly data, using a window of 36 periods, but I have to have at least 12 observations for each estimation - and those do not need consecutive.
I was thinking of having some sort of "if" condition, which would skip a step when not satisfied. For example, if in period 1 I have at least 12 observations, regression will run and I will get the coefficients, at period 2 condition is not satisfied, so I would have no coefficients (is it possible to have missing values?), and in period 3, if i have enough observations, the regression will run again. Any idea how to implement it?
Thank you in advance,
Natalia
PS Something similar has been asked in the link below, however the answer is not exactly what I want to have...
I need some help in the following.
I need to run rolling regressions on monthly data, using a window of 36 periods, but I have to have at least 12 observations for each estimation - and those do not need consecutive.
I was thinking of having some sort of "if" condition, which would skip a step when not satisfied. For example, if in period 1 I have at least 12 observations, regression will run and I will get the coefficients, at period 2 condition is not satisfied, so I would have no coefficients (is it possible to have missing values?), and in period 3, if i have enough observations, the regression will run again. Any idea how to implement it?
Thank you in advance,
Natalia
PS Something similar has been asked in the link below, however the answer is not exactly what I want to have...
Comment