Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: Re: how to regress and outreg by year?


From   "Ziyang Wang" <[email protected]>
To   "[email protected]" <[email protected]>
Subject   Re: st: Re: how to regress and outreg by year?
Date   Thu, 15 May 2008 22:57:54 +0800

I see, I didn't know eststo before, I think it should save some time for outputing regressions.

Thanks,

Martin

======= 2008-05-15 20:49:18 Original Message��=======

>Suggest you use estout:
>
>webuse grunfeld,clear
>keep if year < 1940
>levelsof year, local(yrs)
>eststo clear
>foreach y of local yrs {
>	eststo: qui reg invest mvalue kstock if year == `y'
>}
>esttab
>
>You could readily modify this to handle more years (for instance,  
>keeping track of the count, and writing a table every five years,  
>then clearing stored estimates).
>
>Kit Baum, Boston College Economics and DIW Berlin
>http://ideas.repec.org/e/pba1.html
>An Introduction to Modern Econometrics Using Stata:
>http://www.stata-press.com/books/imeus.html
>
>
>On May 15, 2008, at 02:33 , statalist-digest wrote:
>
>> May I ask a novice question? I'm really new to Stata. I want to run  
>> regression by year and the outreg the coefficients for each year. I  
>> want to use like :
>> by year: xi: areg score age education , absorb(nation), but stata  
>> tells me "by" can not be combined with xi. Anyone has good  
>> solutions? Also I don't think using by can outreg coefficients for  
>> each year.
>
>*
>*   For searches and help try:
>*   http://www.stata.com/support/faqs/res/findit.html
>*   http://www.stata.com/support/statalist/faq
>*   http://www.ats.ucla.edu/stat/stata/
>

= = = = = = = = = = = = = = = = = = = =
			

 

*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index