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 on April 23, and its replacement, is already up and running.

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

st: regression coefficient by group

From   Rui Zeng <>
Subject   st: regression coefficient by group
Date   Mon, 05 Dec 2011 12:18:09 -0600

Dear Statalisters,
 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:

© Copyright 1996–2015 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index