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
[from Kelly Johnson]> 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
>
[...]