<>
Claude said
I would like to create a variable that would contain the means of
subgroups of my sample :
mean yhat, over(demo1)
This command produces a table of means of yhat for the 6 subgroups of
"demo1". I would like to create a variable that would contain these 6
values.
egen gpyhat = mean(yhat), by(demo1)
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
*
* 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/