area hh_no tot_pop q_8 q_10 q_11
1 1 0 1 54 1
1 1 0 2 44 2
1 1 0 3 14 1
1 1 3 4 22 1
1 2 0 1 52 1
1 2 0 2 44 2
1 2 3 3 24 1
1 3 0 1 35 1
1 3 0 2 29 2
1 3 0 4 9 2
1 3 4 3 4 1
1 4 1 1 54 1
1 5 0 1 46 1
1 5 0 2 39 2
1 5 3 3 11 2
1 6 0 1 51 1
1 6 0 2 44 2
1 6 0 3 16 1
1 6 4 4 22 1
1 7 0 1 49 1
1 7 0 2 44 2
1 7 3 3 22 1
.................................................. .........................
.................................................. .........................
In this data set q_10 represents the age of each member. I want to find the average age of each HH. In the tot_pop variable integer number represents the total hh member.
For example (54+44+14+22)/3, (52+44+24)/3 ..
1 1 0 1 54 1
1 1 0 2 44 2
1 1 0 3 14 1
1 1 3 4 22 1
1 2 0 1 52 1
1 2 0 2 44 2
1 2 3 3 24 1
1 3 0 1 35 1
1 3 0 2 29 2
1 3 0 4 9 2
1 3 4 3 4 1
1 4 1 1 54 1
1 5 0 1 46 1
1 5 0 2 39 2
1 5 3 3 11 2
1 6 0 1 51 1
1 6 0 2 44 2
1 6 0 3 16 1
1 6 4 4 22 1
1 7 0 1 49 1
1 7 0 2 44 2
1 7 3 3 22 1
.................................................. .........................
.................................................. .........................
In this data set q_10 represents the age of each member. I want to find the average age of each HH. In the tot_pop variable integer number represents the total hh member.
For example (54+44+14+22)/3, (52+44+24)/3 ..
Comment