I have a data set of individuals who belong to different households, each
with a value of a variable x2. For each household, I would like to create
a new variable that is the mean of x2 for the individuals in that
household. Would anyone be able to help me with the procedure for
this? Do I need to collapse the data set first somehow?