Hi,
I am not sure whether this is what you want. Suppose you have income
varialbe named inc78, inc79 and inc80. You created a new variable called
avginc which is the mean of (inc78 - inc80). You use this command.
egen avginc = rmean(inc78 - inc80)
Do a search on Stata by "egen".
Good luck.
Ying
> hi folks,
>
> suppose i have a data set with say, many variables.
>
> how can i create a new variable that is the (arithmetic) mean of all the
> variables starting with certain letters (i.e. using the '*' operator)?
>
> thanks again!
>
> kj
>
> _________________________________________________________________
> Don�t just search. Find. Check out the new MSN Search!
> http://search.msn.click-url.com/go/onm00200636ave/direct/01/
>
> *
> * 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/