Hi, I am very new to Stata and am trying to merge this data set with my master dataset. I would really appreciate advice on how to merge all the observations for one household with a new indicator variable which will just take the value 1 if any of the below shocks were experienced and 0 if none were. Thank you in advance for any help.
----------------------- copy starting from the next line -----------------------
----------------------- copy starting from the next line -----------------------
Code:
* Example generated by -dataex-. For more info, type help dataex clear input str14 household_id int hh_s8q00 float shock "01010101601017" 116 0 "01010101601017" 117 0 "01010101601017" 118 0 "01010101601034" 101 1 "01010101601034" 102 1 "01010101601034" 103 0 "01010101601034" 104 0 end label values hh_s8q00 hh_s8q00 label def hh_s8q00 101 "Death of Household Member", modify label def hh_s8q00 102 "Illness of Household Member", modify label def hh_s8q00 103 "Loss of Non-farm Jobs of Household Member", modify label def hh_s8q00 104 "Drought", modify label def hh_s8q00 116 "Displacement (Due to Gov Dev Project)", modify label def hh_s8q00 117 "Local Unrest/Violence", modify label def hh_s8q00 118 "Other (Specify)", modify
Comment