I have been trying to get this right but i cant find the right way to apporach this problem. Lets say i have some data that look like this:
hhid totalplacevisited
1 5
1 6
1 2
2 2
2 4
3 1
How can i aggregate the data so i can get values in this format:
hhid totalplacevisited totalplacedvisitedbyhh
1 5 13
1 6 13
1 2 13
2 2 6
2 4 6
3 1 1