Bookmark and Share

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]

RE: st: RE: How to do dynamic forecasts in xtreg (etc.) in Stata 10?


From   Toby Robertson <toby.robertson@hotmail.com>
To   "statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu>
Subject   RE: st: RE: How to do dynamic forecasts in xtreg (etc.) in Stata 10?
Date   Sat, 14 Dec 2013 08:52:50 +0000

I settled for this (which assumes t=2014 is the first period without data for y, but projected values of x for t>2014 exist in the data):

xtset i t
xtreg y L.y x
predict effect, u
egen u=mean(effect), by(i)
gen yhat=y if t==2013
xtset
replace yhat=_b[L.y]*L.yhat + _b[x]*x + _b[_cons] + u if t>2013

I would still be interested to know whether there is a more general method.

----------------------------------------
> From: toby.robertson@hotmail.com
> To: statalist@hsphsun2.harvard.edu
> Subject: st: RE: How to do dynamic forecasts in xtreg (etc.) in Stata 10?
> Date: Sat, 14 Dec 2013 05:09:00 +0000
>
> Apologies if this has been asked and answered many times, but what is the easiest way in Stata 10 to create dynamic forecasts from a panel regression (such as xtreg or xtabond) with a lagged dependent variable?
>
> In a time series, one can use -predict- after -arima- (instead of -regress-), but what about when the data form a panel?
>
> Thanks in advance for advice or a pointer to a past answer.
>
> Toby
> *
> * For searches and help try:
> * http://www.stata.com/help.cgi?search
> * http://www.stata.com/support/faqs/resources/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/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


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