Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at

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

st: Date Formats in Loops

From   "Degas Wright" <>
To   <>
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

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
		  post `vector'	(`i') (`j')	(_b[D.ep])  (_b[])
(_b[_cons])	/// 
			(_se[D.ep]) (_se[]) (_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 =
       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

*   For searches and help try:

© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index