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: RE: RE: Date Formats in Loops


From   "Degas Wright" <[email protected]>
To   <[email protected]>
Subject   st: RE: RE: Date Formats in Loops
Date   Wed, 3 Nov 2010 19:31:01 -0400

Kit & Nick

Thank you for your solutions.  

Kit thank you for your code. Being new to Stata is like learning a new
language and it is great to have experienced Stata users that are
willing to 'translate'!

Thanks,

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

-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Nick Cox
Sent: Wednesday, November 03, 2010 2:53 PM
To: '[email protected]'
Subject: st: RE: Date Formats in Loops

Kit already answered, but your search sequence is best as help --
manuals -- FAQs. 

Although there a few hundred FAQs at www.stata.com, their main function
is to fill in gaps or spell out points that are sometimes misunderstood.
Sometimes, where the documentation is detailed and fine, there are no
corresponding FAQs. 

In this territory, for an introduction, see [U] Working with dates and
times. For more
comprehensive treatments, see [D] dates and times and [D] functions.

Nick 
[email protected] 

Degas Wright

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        


*
*   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/

*
*   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