Statalist


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

Re: st: mean of variables


From   "Andrea Rispoli" <andrea.rspl@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: mean of variables
Date   Sat, 24 May 2008 10:20:41 +0200

Thank you very much!

On Thu, May 22, 2008 at 6:40 PM, Jeph Herrin <junk@spandrel.net> wrote:
>
> Under -egen- you will find the -rowmean- function:
>
>  egen mymean = rowmean(var1 var2 var3)
>
> will do what you want.
>
> I've always that -egen- was "underindexed"; you can't
> find this functions even with -search rowmean-.
>
> hope this helps,
> Jeph
>
> Andrea Rispoli wrote:
>>
>> Dear Statalist Members,
>> I would like to know how to build mean variables in Stata.
>> To be more specific, suppose that I have three columns/variables
>> indicating sales in 3 different years for each observation, and I'd
>> like to build a fourth column which contains the mean of sales in the
>> three years for each observation.
>> Could you please indicate me the code? (I have already checked in the
>> manual but I could not find anything that helped me)
>> Thank you very much
>> A.R.
>> *
>> *   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/
>
*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index