Statalist


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

st: Using Rolling Regression with Panel Data


From   "Degas Wright" <[email protected]>
To   <[email protected]>
Subject   st: Using Rolling Regression with Panel Data
Date   Mon, 28 Sep 2009 22:10:21 -0400

I have a longitudinal dataset that has 2000 stocks as xticker (id) and
dependent variable, return (t+1), with 20 independent variables (t) over 88
periods (months).

I am trying to run a , xtreg, regression over three periods and then use the
coefficients from the regression to forecast the t+1 return.  When I use the
following command:

. rolling _b _se, window (3) clear: xtreg return, var1, var2,.var20,
vce(cluster xticker)

(running regress on estimation sample)

-> xticker = 1

Rolling replications (86)
----+--- 1 ---+--- 2 ---+--- 3 ---+--- 4 ---+--- 5 
.........

-> xticker = 2

Rolling replications (86)
----+--- 1 ---+--- 2 ---+--- 3 ---+--- 4 ---+--- 5 
........

It starts going through each of the 2000 stocks, by listing xticker1,
xticker 2, etc..  I have stopped it prior to the run being completed because
it will take a long time to go through all 2000 stocks.

Is there another command that I should be using?  For instance I use the
forvalues command to run the regression, xtreg, one period at a time for all
of the periods, Period 1, Period 2, etc.

Thank you for your assistance. 




Degas A. Wright, CFA
Chief Investment Officer
Decatur Capital Management, Inc.
250 East Ponce De Leon Avenue, Suite 325
Decatur, Georgia  30030
Voice: 404.270.9838
Fax:404.270.9840
Website: www.decaturcapital.com





*
*   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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index