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

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

From |
Edin Zoronjic <edinvz@gmail.com> |

To |
statalist@hsphsun2.harvard.edu |

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

Date |
Tue, 21 Aug 2012 01:50:46 +0100 |

Thank you very much for your answers, I appreciate your willingness to help me. I will try to clarify what I am doing: 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, When I do in-sample forecast, Stata generates predicted values for t-1 observations. However, when I expand the data set and do out-of-sample forecast, Stata does not generate any values. When I am doing simple ARIMA forecast (regressing dependent variable on its lags), Stata generates predicted values for t+h-1 value (where "h" is the period of forecast). There are no missing values in my data set for all the variables I include (cpi, factor1, factor2). I am really sorry for disturbing you one more time. Thank you in advance. Best regards, Edin On 21 August 2012 00:36, Christopher Baum <kit.baum@bc.edu> wrote: > <> > Edin said > > I am currently working on my master thesis which is focused on the Dynamic > factor model forecasting. > Unfortunately, I got stuck at the out-of-sample forecasting. After running > OLS regression when I try to do out-of-sample forecast, Stata generates the > missing values for all the observations. > > > 2011m12 is the last observation in my sample, afterward data set was > expanded. I am using following command after running regression: > > predict pcpi if t>tm(2011m12) > > I would really appreciate if somebody could tell me what the potential > source of this problem is and how I could solve it. > > > > I am confused by the mention of 'dynamic factor model', as there are such models (-dfactor-) in Stata. But I think what Edin > means is that he wants to do out-of-sample dynamic forecasting from a plain OLS regression. This can (currently only) be done with -arima-, > which despite its name can estimate OLS regressions, and can generate dynamic forecasts (help arima postestikmation) from a model > such as y_t = b0 + b_1 y_t-1 + x_t + epsilon_t. As Nick Cox points out, you must have values of x_t defined during the ex ante forecast 'period. > But in a dynamic forecast, you need not have values of y_t-1 beyond the estimation sample. > > Kit > > Kit Baum | Boston College Economics & DIW Berlin | http://ideas.repec.org/e/pba1.html > An Introduction to Stata Programming | http://www.stata-press.com/books/isp.html > An Introduction to Modern Econometrics Using Stata | http://www.stata-press.com/books/imeus.html > > > * > * For searches and help try: > * http://www.stata.com/help.cgi?search > * http://www.stata.com/support/statalist/faq > * http://www.ats.ucla.edu/stat/stata/ * * For searches and help try: * http://www.stata.com/help.cgi?search * http://www.stata.com/support/statalist/faq * http://www.ats.ucla.edu/stat/stata/

**References**:**re: st: Out-of-sample forecasting using OLS regression***From:*Christopher Baum <kit.baum@bc.edu>

- Prev by Date:
**st: component order for fmm** - Next by Date:
**re: Re: st: Out-of-sample forecasting using OLS regression** - Previous by thread:
**re: st: Out-of-sample forecasting using OLS regression** - Next by thread:
**re: Re: st: Out-of-sample forecasting using OLS regression** - Index(es):