[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
Lets say i have a list of 10 individuals and 10 scores. For each individual
I would like to compute a new variable that is the average of the other 9
scores. Any ideas on how that can be done?
The data for the example look like this:
id score newvar
The next problem I am having difficulty with is that these 10 individuals
are nested within a community and there are, lets say, 5 communities in
total with 10 individual is each for total N of 50. I would like to compute
the new variable, where the value for a particular individual is the average
of the scores for the other 9 people in the community where they reside. So
I would like to repeat the procedure separately for each community.
Any help is greatly appreciated,
* For searches and help try: