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: Date Formats in Loops
From 
 
"Degas Wright" <[email protected]> 
To 
 
<[email protected]> 
Subject 
 
st: Date Formats in Loops 
Date 
 
Wed, 3 Nov 2010 14:16:18 -0400 
I have a simple question, on the Time Period title for my regression
results, I would like to show the weekly date format rather than the
number. I have reviewed the FAQ and did not see how to approach this
issue.     
Thank you in advance for your comments.
local lo=tw(2006w15)
	local hi=tw(2010w30)
	
	forvalues i= `lo' / `hi' {
		local j=`i'+11
		local t1=`i'
		local t2= `j'
		display _n(3) in white _col(30) /// 
		"Time period:"  `t1'  "-" `t2'
		  xtregar (D.(r ep mom))  if date>=`i' & date<=`j' , fe
lbi 
		  post `vector'	(`i') (`j')	(_b[D.ep])  (_b[D.mom])
(_b[_cons])	/// 
			(_se[D.ep]) (_se[D.mom]) (_se[_cons]) 
		    local j=`j'+1
        }
A example of the results are :
                              Time period:2629-2640
FE (within) regression with AR(1) disturbances  Number of obs  =     99
Group variable: xticker                         Number of groups =     9
R-sq:  within  = 0.6656                         Obs per group: min =  11
       between = 0.0193                                        avg =
11.0
       overall = 0.4579        
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/