I have data in the following format where each firm is audited by either 1 or two auditors.
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input str7 firm str1(aud1 aud2) "Firm 1" "A" "" "Firm 2" "B" "A" "Firm 3" "B" "D" "Firm 4" "A" "E" "Firm 5" "C" "" "Firm 6" "C" "B" "Firm 7" "D" "F" "Firm 8" "E" "" "Firm 9" "E" "A" "Firm 10" "F" "G" end
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input str7 firm str1 aud1 float unique_id_1 str1 aud2 float unique_id_2 "Firm 1" "A" 1 "" . "Firm 2" "B" 2 "A" 1 "Firm 3" "B" 2 "D" 4 "Firm 4" "A" 1 "E" 5 "Firm 5" "C" 3 "" . "Firm 6" "C" 3 "B" 2 "Firm 7" "D" 4 "F" 6 "Firm 8" "E" 5 "" . "Firm 9" "E" 5 "A" 1 "Firm 10" "F" 6 "G" 7 end
Warm regards
Amish
0 Response to Generating unique id across variables
Post a Comment