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]

st: re: depvar and rolling regressions


From   Christopher F Baum <[email protected]>
To   <[email protected]>
Subject   st: re: depvar and rolling regressions
Date   Mon, 1 Nov 2010 13:13:40 -0400

<>
I have a simple question, I am using the -rolling- command and how do I
get the depvar forecast from my regressions.  The predict command is not
working since the e(sample) is not being saved each rolling period;
eventhough, I am saving the rolling outputs to a *.dta file.

My code is:

rolling _b, window(12) saving(rolltest) noisily: xtregar (D.(r ep mom)),
fe lbi

predict Dr_f, ue

last estimates not found



You need to do something similar to what is done in -myregress- (findit myregress). rolling:, like by:, statsby:. simulate: etc cannot execute multiple commands. Thus you need to write a very simple 'wrapper command' that packages the estimation and prediction (or, in myregress, the lincom) which you can then invoke instead of xtregar.

Kit

Kit Baum   |   Boston College Economics and 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/


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