Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Re: st: Out-of-sample forecasting using OLS regression

From   Edin Zoronjic <>
Subject   Re: Re: st: Out-of-sample forecasting using OLS regression
Date   Tue, 21 Aug 2012 04:23:02 +0100

Thank you very much for the clarification.

Basically, it is forecasting using OLS. But using factors estimated by
principal component, based on large number of series in the literature
(Stock and Watson, Forni et al) is referred as Dynamic factor model

But, it does not really mater how we call it. What I am interested in
is whether I can perform the forecast for the period for which data is
not included in the data set, as I have done for ARIMA forecast
(without factors).

As my work is based on the data of transition economy, the span and
the length of available series are very limited. Therefore, I would
not like to lose any observations.

I would like to do the forecast based on the model which is estimated
using the available data. And then, I can compare the ARIMA and the
DFM forecast with actual values (which are available for the variable
of interest, while the data on other series used in estimation of
factors are not available).

I am really sorry for bothering you, but I do believe that there is a
way to do the forecast for future period. And that is why I do not
understand why Stata does not generate predicted values for the future

Thank you very much and excuse me one more time for bothering you.

Best regards,


On 21 August 2012 02:45, Christopher Baum <> wrote:
> <>
> Edin said
> I do dynamic factor model as it follows:
> First of all I generate factors using factor analysis function which
> is available in Stata.
> Secondly, I save two factors in my data set as new variables.
> Thirdly, I run following regression (ARIMA or OLS):
> cpi = c + l.cpi + factor1 + factor2...
> OK, so it is just OLS, with a desire to perform a dynamic forecast ex ante. The following will do that, and contrast it with the static (one-period-ahead) forecast. In the dynamic forecast, the past value of l.cpi generated by the model will be used after the end of the estimation sample, rather than the historical value. (OK, I know this equation is dynamically unstable, but it is merely illustrative).
> use,clear
> arima cpi l.cpi d.oilprice d.wage if tin(, 2008q4)
> predict double cpihat_s if tin(2006q1,), y
> predict double cpihat_d if tin(2006q1,), dynamic(tq(2008q4)) y
> tsline cpihat_s cpihat_d if !mi(cpihat_s)
> Kit
> Kit Baum   |   Boston College Economics & DIW Berlin   |
>                              An Introduction to Stata Programming  |
>   An Introduction to Modern Econometrics Using Stata  |
> *
> *   For searches and help try:
> *
> *
> *

*   For searches and help try:

© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index