Dear All:
I would like to compute the average of three variables for several observations. For some of them, data is missing for one or two variables.
I do:
gen average=(var1+var2+var3)/3
When one figure (at least) is missing, Stata returns a missing average.
Is there an easy way to tell Stata to compute the average on the available data (one, two or three depending on the observations), even though some data are missing?
Best regards
Herv� Stolowy
***********************************************************
HEC Paris
D�partement Comptabilit�-Contr�le de gestion / Dept of Accounting and Management Control
1, rue de la Liberation
78351 - Jouy-en-Josas
France
Tel: +33 1 39 67 94 42
Fax: +33 1 39 67 70 86
[email protected]
http://campus.hec.fr/profs/stolowy/perso/home.htm
*
* 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/