Hi everyone! Few variables from my dataset look like as provided below. This is from individual level dataset where in the household level no.of participants are aggregated by total no.of individual participants. But since it is individual-level dataset, the unique Household identifier is repeated multiple times according to the no.of individuals surveyed in each wave (2 period panel data). My issue is I want to combine these to a household dataset where one specific household is only one record per 1 survey, just as in the case of desired dataset specified. How do I create a new variable where I only can record the total no.of participants at the individual level once, so I can merge that to the household-level dataset? Will be happy to provide more details if required. Thanks in advance!

Original dataset

HHBASE2 SURVEY hh_farm_participants05 hh_nonfarm_participants05 hh_farm_participants12 hh_nonfarm_participants12
"10102010100" 1 0 2 0 0
"10102010100" 1 0 2 0 0
"10102010100" 1 0 2 0 0
"10102010100" 2 0 2 0 0
"10102010100" 2 0 2 0 0
"10102010100" 2 0 2 0 0
"10102010200" 1 0 4 0 0
"10102010200" 1 0 4 0 0
"10102010200" 1 0 4 0 0
"10102010200" 1 0 4 0 0
"10102010200" 2 0 3 0 2
"10102010200" 2 0 3 0 2
"10102010200" 2 0 3 0 2

Desired dataset

HHBASE2 SURVEY hh_farm_participants05 hh_nonfarm_participants05 hh_farm_participants12 hh_nonfarm_participants12
"10102010100" 1 0 2 0 0
"10102010100" 2 0 1 0 0
"10102010200" 1 0 2 0 0
"10102010200" 2 0 4 0 0
"10102010300" 1 0 4 0 0
"10102010300" 2 0 4 0 0