Hello all, I am trying to drop the duplicate id. For example in below i have computed the total of expenses for each categories for a household using egen var= total(var), by(WWWHH). Now i want the total for each variables corrosponding to each id. However, as can be seen in data, for id 1, the total of grains is appeared in first few rows while pules expenditure appears thereafter and so on. If i use the command duplicates drop then my pulses_exp milk_exp will all be missing. How i can total for example like
id grains_exp pulse_exp
1 2544 160
and so on.
,
id grains_exp pulse_exp
1 2544 160
and so on.
,
Comment