Statalist


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

st: R: mean of variables


From   "Carlo Lazzaro" <[email protected]>
To   <[email protected]>
Subject   st: R: mean of variables
Date   Thu, 22 May 2008 18:39:40 +0200

Dear Andrea,

the following line can do the trick:

egen D=rowmean( A B C)

HTH and Kind Regards,

Carlo

-----Messaggio originale-----
Da: [email protected]
[mailto:[email protected]] Per conto di Andrea Rispoli
Inviato: gioved� 22 maggio 2008 18.16
A: [email protected]
Oggetto: st: mean of variables

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/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index