Hello Everyone,
Can someone help me creat a unique ID by using 4 variables i.e. branch (2 categories), club (10 categories), ELA member (2 categories), and household (max 40 observations per club)
The idea is to get ID system that combines branch, club, household, and ELA member, looking something like BCHHEM? For example, 104050 would be branch=1, club=4, household=5, and non ela member.
Can someone help me creat a unique ID by using 4 variables i.e. branch (2 categories), club (10 categories), ELA member (2 categories), and household (max 40 observations per club)
The idea is to get ID system that combines branch, club, household, and ELA member, looking something like BCHHEM? For example, 104050 would be branch=1, club=4, household=5, and non ela member.
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input byte branch float ELA byte club str41 id 1 1 4 "uuid:029a6e89-1f8a-46f6-8390-0b6acf39aa8e" 1 0 4 "uuid:ee5841d7-dda2-4bb6-87b8-31ea089fda3e" 1 1 4 "uuid:95d5651e-8828-4432-861d-a41759203410" 1 1 4 "uuid:4e3d25e8-94e6-4b7a-aa52-666c5fb07cef" 1 1 5 "uuid:2f4a7196-8a2f-47a5-aab3-f58221e4525d" 1 0 5 "uuid:13100224-60ed-4b18-8fdb-5dd176300427" 1 0 5 "uuid:47da6e61-112b-487d-8224-cfe30c356c63" 1 1 5 "uuid:83797e5b-9a82-4740-97bc-baf42ce2697a" 2 1 8 "uuid:cafccc55-77b0-47dc-a951-08d527e3b6b6" 2 1 8 "uuid:8ec49aa7-4b36-4053-8cd1-a17ea642f434" end label values branch branch label def branch 1 "Kasubi", modify label def branch 2 "Wakiso", modify label values ELA ela label def ela 0 "Non ELA Member", modify label def ela 1 "ELA Member", modify label values club club label def club 4 "Makerere", modify label def club 5 "Munaku", modify label def club 8 "Kikubapanga A", modify
Comment