Dear All, I find this question here. The data is
Code:
* Example generated by -dataex-. To install: ssc install dataex
clear
input int ExpertID byte(domain_A domain_B domain_C domain_D domain_E)
290 . . 1 . .
 90 1 . . . .
149 1 . . . .
 11 1 1 1 0 0
181 1 1 1 0 0
 17 1 . . 1 .
142 1 . 1 . .
 40 1 1 . . .
106 . . . 1 .
182 1 0 0 0 0
end
and the desired result is
Code:
* Example generated by -dataex-. To install: ssc install dataex
clear
input int ExpertID str10 domain
290 C
 90 A 
149 A 
 11 ABC
181 ABC
 17 AD
142 AC 
 40 AB
106 D
182 A 
end
The rule is, for example, for ExpertID=290, only domain_C=1, so the desired result is domain=C. Another example, for ExpertID=11, domain_A, domain_B, and domain_C are all equal to 1, so the desired result is domain=ABC, and so on. Any suggestion is appreciated.