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: Rolling XT Regressions


From   "Degas Wright" <[email protected]>
To   <[email protected]>
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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index