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 on April 23, and its replacement, is already up and running.

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

st: Rolling XT Regressions

From   "Degas Wright" <>
To   <>
Subject   st: Rolling XT Regressions
Date   Wed, 27 Oct 2010 00:42:41 -0400

I am attempting to perform -rolling_b, windows(12)- with the -xtregar-
command, to conduct the -xtregar- analysis over the cross section of
stocks and over 12 weekly observations.  Then I use the -predict-
command and save the results in myfcst1 file. Prior to adding the
-rolling step, the code worked fine. I am getting the following error:

xtregar(D.(r command not found

My code is a follows:

xtset xticker date

                by xticker:drop if _N<20

                levelsof xticker,local(id)


                cd c:\ZACKS\RES\LOC\OUTPUT\

                capture erase myfcst1.dta

                set more off


                foreach x of local id {


       display _n(2) _col(30) in green "Regression  for  xticker: "`x'

             rolling _b, window(12) clear: xtregar(D.(r ep mom qer fsr
bb bm mc))if xticker==`x', fe lbi


                                keep if e(sample)

					predict Dr_f, ue
                                keep xticker date Dr_f 

                                keep if xticker==`x'

                                capture append using myfcst1

                                xtset xticker date

                                save myfcst1,replace



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

*   For searches and help try:

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