Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


[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 <maartenlbuis@googlemail.com>
To   statalist@hsphsun2.harvard.edu
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

--------------------------
Maarten L. Buis
Institut fuer Soziologie
Universitaet Tuebingen
Wilhelmstrasse 36
72074 Tuebingen
Germany


http://www.maartenbuis.nl
--------------------------
*
*   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/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index