[Stata 11] BHPS: generating household averages?

#1
Hi folks,

I'm trying to generate the average of a variable for a household. My data is in long format and each individual has a household identification number (ie:14004357): each household usually has more than 1 individual.

How can I generate a variable which is the average (say, age) of all the members of the household? There are around 10,000 households so obviously i cannot do this manually. Any help much appreciated.

Thanks,
Chris