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, statalist.org is already up and running.


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

st: Rolling XT Regressions


From   "Degas Wright" <dwright@cornerstoneadvice.com>
To   <statalist@hsphsun2.harvard.edu>
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
r(111);

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 {

                   preserve

       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

                   restore

                } 


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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index