Try -egen, mean()- which allows -by-
HTH
Martin
-------- Original-Nachricht --------
> Datum: Sat, 03 Jan 2009 14:11:35 -0500
> Von: Claude Francoeur <[email protected]>
> An: "[email protected]" <[email protected]>
> Betreff: st: Create a variable containing the means of subgroups
> Hello,
>
> 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.
>
> Thank you for your help.
>
> Claude
>
>
> *
> * 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/
--
Martin Weiss
Hackersteigle 3
72076 Tübingen
00497071/793535
00491784597218
Psssst! Schon vom neuen GMX MultiMessenger gehört? Der kann`s mit allen: http://www.gmx.net/de/go/multimessenger
*
* 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/