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: st: out-of-sample prediction does not work after -regress- with lags

From   maarten buis <>
Subject   Re: st: out-of-sample prediction does not work after -regress- with lags
Date   Wed, 4 May 2011 13:41:11 +0200

On Wed, May 4, 2011 at 1:24 PM, Mirko wrote:
> I cannot get out-of-sample forecasting after a regression with lags:
> According to the manual, "-predict- can be used to make in-sample or
> out-of-sample predictions:
> 6. predict calculates the requested statistic for all possible
> observations, whether they were used in fitting the model or not."
> However from the example above only one out of sample data is predicted.

To do out of sample predictions Stata must know the values of all
explanatory variables. So, in order to predict the outcome Stata needs
to know all the lagged values. If these are missing than what should it
predict? Prediction is just filling in an equation, if one of the elements
is missing than the result will be missing.

Hope this helps,

Maarten L. Buis
Institut fuer Soziologie
Universitaet Tuebingen
Wilhelmstrasse 36
72074 Tuebingen
*   For searches and help try:

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