Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


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

Re: st: RE: regression coefficient by group


From   Rui Zeng <rzeng@wisc.edu>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: RE: regression coefficient by group
Date   Wed, 07 Dec 2011 23:18:47 -0600

Nick's suggestion of statsby works really well. However, I still have an issue: the speed.  I have to run 4000 regressions/month over a period of 300 months, with statsby I think that will takes me about 10+days to get the result. That is something that should never happen if I use STATA, so dear statalisters, any good suggestions? thanks!
 
On 12/05/11, Nick Cox wrote:
> . help statsby 
> 
> Nick 
> n.j.cox@durham.ac.uk 
> 
> Rui Zeng
> 
> I want to collapse my dataset by a group variable and retain the regression coefficient of the independent variables. In other words, I'd like to be able to do something like:
> 
> by group: egen regression coefficients =regress(var1 var2 var3 var4)
> collapse corr12, by(group)
> 
> 
> I know I can do:
> by group: regress var1 var2 var3 var4
> but I want to save the results and do further analysis on them rather than just displaying them.
> 
> 
> *
> * 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/
 
--
Rui Zeng, CFA
Doctoral Student in Finance
Wisconsin School of Business
University of Wisconsin Madison
email:rzeng@wisc.edu
*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index