Hello,
I am relatively new to forecasting procedures. I am attempting to forecast series based on a panel model (estimated by xtreg). I find that the explanations provided in the help file of the "forecast solve" command to be somewhat unhelpful, namely the explanations of what the "begin", "end" and "period" options do exactly.
Concretely, I have a panel with T=29 and N=150. the model I estimated is:
y_it = mu_i + a*y_it-1 + beta'*X_it + eps_it
so, a standard dynamic panel model (T is large, so the bias should be negligible).
I wanted to do some out-of sample forecasting by running the regression over the first 28 periods and then doing a 1 step ahead forecast. Given the explanation in the help file I wrote the following command:
forecast solve, prefix(s_2) begin(2015) end(2015) static
So, forecast for period 29 (i.e. 2015 in the sample) and end there. This does not produce the result I expected. The command produces forecasts for every single period it can, for reasons I do not understand. I tried some other combinations of the "begin", "end" and "period" options, but the results remained less than clear. For example, if I run:
forecast solve, prefix(s_2) begin(2003) static
Stata calculates forecasts for the periods before and including 2003 and not for the periods ahead. I don't really understand the logic of the word "begin", as used for this option.
If, on the other hand, I run something of the sort:
forecast solve, prefix(s_2) begin(1987) end(2015) static
I get the same number of forecasts produced using the 1st command, but the values are different.
Could someone explain to me what exactly are "begin", "end" and "period" specifiying?
Thank you
João Oliveira
I am relatively new to forecasting procedures. I am attempting to forecast series based on a panel model (estimated by xtreg). I find that the explanations provided in the help file of the "forecast solve" command to be somewhat unhelpful, namely the explanations of what the "begin", "end" and "period" options do exactly.
Concretely, I have a panel with T=29 and N=150. the model I estimated is:
y_it = mu_i + a*y_it-1 + beta'*X_it + eps_it
so, a standard dynamic panel model (T is large, so the bias should be negligible).
I wanted to do some out-of sample forecasting by running the regression over the first 28 periods and then doing a 1 step ahead forecast. Given the explanation in the help file I wrote the following command:
forecast solve, prefix(s_2) begin(2015) end(2015) static
So, forecast for period 29 (i.e. 2015 in the sample) and end there. This does not produce the result I expected. The command produces forecasts for every single period it can, for reasons I do not understand. I tried some other combinations of the "begin", "end" and "period" options, but the results remained less than clear. For example, if I run:
forecast solve, prefix(s_2) begin(2003) static
Stata calculates forecasts for the periods before and including 2003 and not for the periods ahead. I don't really understand the logic of the word "begin", as used for this option.
If, on the other hand, I run something of the sort:
forecast solve, prefix(s_2) begin(1987) end(2015) static
I get the same number of forecasts produced using the 1st command, but the values are different.
Could someone explain to me what exactly are "begin", "end" and "period" specifiying?
Thank you
João Oliveira
Comment