I am working with HIES data. Following is the data where S9EQ00 is the durable item code a household owns. HHID is the household identification number.
(TERM PSU HHID S9EQ00 S9EQ01 S9EQ02)
1 1 6 1016 1 1
1 1 6 1017 2 .
1 1 6 1018 2 .
1 1 6 1019 1 1
1 1 6 1020 1 1
1 1 6 1026 2 .
1 1 6 1027 1 1
1 1 6 1028 2 .
1 1 6 1029 2 .
1 1 6 1031 1 1
1 1 6 1032 2 .
1 1 6 1033 1 1
1 1 6 1034 2 .
1 1 6 1043 2 .
1 1 9 1016 1 1
1 1 9 1017 2 .
1 1 9 1018 2 .
1 1 9 1019 1 2
1 1 9 1020 1 2
1 1 9 1026 2 .
1 1 9 1027 1 1
1 1 9 1028 2 .
1 1 9 1029 2 .
1 1 9 1031 2 .
1 1 9 1032 2 .
1 1 9 1033 2 .
1 1 9 1034 2 .
1 1 9 1043 1 1
1 1 14 1016 1 1
1 1 14 1017 2 .
1 1 14 1018 2 .
1 1 14 1019 1 2
1 1 14 1020 1 2
1 1 14 1026 2 .
1 1 14 1027 2 .
1 1 14 1028 2 .
1 1 14 1029 2 .
1 1 14 1031 2 .
1 1 14 1032 2 .
1 1 14 1033 2 .
1 1 14 1034 2 .
1 1 14 1043 2 .
1 1 28 1016 2 .
1 1 28 1017 2 .
1 1 28 1018 2 .
1 1 28 1019 2 .
1 1 28 1020 1 3
1 1 28 1026 2 .
1 1 28 1027 2 .
1 1 28 1028 2 .
1 1 28 1029 2 .
1 1 28 1031 2 .
1 1 28 1032 2 .
1 1 28 1033 2 .
1 1 28 1034 2 .
1 1 28 1043 2 .
1 1 29 1016 2 .
1 1 29 1017 2 .
1 1 29 1018 2 .
1 1 29 1019 2 .
1 1 29 1020 1 2
1 1 29 1026 2 .
1 1 29 1027 2 .
1 1 29 1028 2 .
1 1 29 1029 2 .
1 1 29 1031 2 .
1 1 29 1032 2 .
1 1 29 1033 2 .
1 1 29 1034 2 .
1 1 29 1043 2 .
1 1 33 1016 1 1
1 1 33 1017 2 .
1 1 33 1018 2 .
1 1 33 1019 2 .
1 1 33 1020 1 2
1 1 33 1026 2 .
1 1 33 1027 1 1
1 1 33 1028 2 .
1 1 33 1029 2 .
1 1 33 1031 2 .
1 1 33 1032 2 .
1 1 33 1033 2 .
1 1 33 1034 2 .
1 1 33 1043 2 .
1 1 38 1016 1 1
1 1 38 1017 2 .
1 1 38 1018 2 .
1 1 38 1019 1 2
1 1 38 1020 1 1
1 1 38 1026 2 .
1 1 38 1027 1 1
1 1 38 1028 2 .
1 1 38 1029 2 .
1 1 38 1031 2 .
1 1 38 1032 2 .
1 1 38 1033 2 .
1 1 38 1034 2 .
1 1 38 1043 2 .
1 1 45 1016 2 .
1 1 45 1017 2 .
end
label values S9EQ00 S9EQ00
label def S9EQ00 1016 "TV set", modify
label def S9EQ00 1017 "Desktop Computer", modify
label def S9EQ00 1018 "Laptop Computer", modify
label def S9EQ00 1019 "Mobile Handset (Smart Phone)", modify
label def S9EQ00 1020 "Mobile Handset (Feature/Button Phone)", modify
label def S9EQ00 1026 "Microwave/ Electric Oven", modify
label def S9EQ00 1027 "Refreigerator/Fridger", modify
label def S9EQ00 1028 "*Air Conditioner/ Cooler (AC)", modify
label def S9EQ00 1029 "Washing Machine", modify
label def S9EQ00 1031 "Bicycle", modify
label def S9EQ00 1032 "Rikshaw/Auto-Rikshaw/Easybike", modify
label def S9EQ00 1033 "Motorcycle/Scooter", modify
label def S9EQ00 1034 "Motor Car", modify
label def S9EQ00 1043 "Boat/Engine Boat", modify
My question is how can I generate household ID number from this data?
(TERM PSU HHID S9EQ00 S9EQ01 S9EQ02)
1 1 6 1016 1 1
1 1 6 1017 2 .
1 1 6 1018 2 .
1 1 6 1019 1 1
1 1 6 1020 1 1
1 1 6 1026 2 .
1 1 6 1027 1 1
1 1 6 1028 2 .
1 1 6 1029 2 .
1 1 6 1031 1 1
1 1 6 1032 2 .
1 1 6 1033 1 1
1 1 6 1034 2 .
1 1 6 1043 2 .
1 1 9 1016 1 1
1 1 9 1017 2 .
1 1 9 1018 2 .
1 1 9 1019 1 2
1 1 9 1020 1 2
1 1 9 1026 2 .
1 1 9 1027 1 1
1 1 9 1028 2 .
1 1 9 1029 2 .
1 1 9 1031 2 .
1 1 9 1032 2 .
1 1 9 1033 2 .
1 1 9 1034 2 .
1 1 9 1043 1 1
1 1 14 1016 1 1
1 1 14 1017 2 .
1 1 14 1018 2 .
1 1 14 1019 1 2
1 1 14 1020 1 2
1 1 14 1026 2 .
1 1 14 1027 2 .
1 1 14 1028 2 .
1 1 14 1029 2 .
1 1 14 1031 2 .
1 1 14 1032 2 .
1 1 14 1033 2 .
1 1 14 1034 2 .
1 1 14 1043 2 .
1 1 28 1016 2 .
1 1 28 1017 2 .
1 1 28 1018 2 .
1 1 28 1019 2 .
1 1 28 1020 1 3
1 1 28 1026 2 .
1 1 28 1027 2 .
1 1 28 1028 2 .
1 1 28 1029 2 .
1 1 28 1031 2 .
1 1 28 1032 2 .
1 1 28 1033 2 .
1 1 28 1034 2 .
1 1 28 1043 2 .
1 1 29 1016 2 .
1 1 29 1017 2 .
1 1 29 1018 2 .
1 1 29 1019 2 .
1 1 29 1020 1 2
1 1 29 1026 2 .
1 1 29 1027 2 .
1 1 29 1028 2 .
1 1 29 1029 2 .
1 1 29 1031 2 .
1 1 29 1032 2 .
1 1 29 1033 2 .
1 1 29 1034 2 .
1 1 29 1043 2 .
1 1 33 1016 1 1
1 1 33 1017 2 .
1 1 33 1018 2 .
1 1 33 1019 2 .
1 1 33 1020 1 2
1 1 33 1026 2 .
1 1 33 1027 1 1
1 1 33 1028 2 .
1 1 33 1029 2 .
1 1 33 1031 2 .
1 1 33 1032 2 .
1 1 33 1033 2 .
1 1 33 1034 2 .
1 1 33 1043 2 .
1 1 38 1016 1 1
1 1 38 1017 2 .
1 1 38 1018 2 .
1 1 38 1019 1 2
1 1 38 1020 1 1
1 1 38 1026 2 .
1 1 38 1027 1 1
1 1 38 1028 2 .
1 1 38 1029 2 .
1 1 38 1031 2 .
1 1 38 1032 2 .
1 1 38 1033 2 .
1 1 38 1034 2 .
1 1 38 1043 2 .
1 1 45 1016 2 .
1 1 45 1017 2 .
end
label values S9EQ00 S9EQ00
label def S9EQ00 1016 "TV set", modify
label def S9EQ00 1017 "Desktop Computer", modify
label def S9EQ00 1018 "Laptop Computer", modify
label def S9EQ00 1019 "Mobile Handset (Smart Phone)", modify
label def S9EQ00 1020 "Mobile Handset (Feature/Button Phone)", modify
label def S9EQ00 1026 "Microwave/ Electric Oven", modify
label def S9EQ00 1027 "Refreigerator/Fridger", modify
label def S9EQ00 1028 "*Air Conditioner/ Cooler (AC)", modify
label def S9EQ00 1029 "Washing Machine", modify
label def S9EQ00 1031 "Bicycle", modify
label def S9EQ00 1032 "Rikshaw/Auto-Rikshaw/Easybike", modify
label def S9EQ00 1033 "Motorcycle/Scooter", modify
label def S9EQ00 1034 "Motor Car", modify
label def S9EQ00 1043 "Boat/Engine Boat", modify
My question is how can I generate household ID number from this data?
Comment