Hi everyone,
I have dataset which has event_date, firm_a, firm_b, person_ax (who are in firm_a) and person_by (who are in firm_b).
I'm trying to identify for each event_date, which individual shares position in both firm_a and firm_b.
For example, at event_date "5-Feb-08", individual "d" and "e" share position in both firm_a and firm_b. And I want to keep the observation with shared individual, like the following:
str9 event_date byte(firm_a firm_b) str1(person_ax person_by)
"5-Feb-08" 1 2 "d" "d"
"5-Feb-08" 1 2 "e" "e"
Much appreciated for your time and help.
I'm new the Stata and Statalist, please feel free to ask any questions if I've not make myself clear.
Cheers,
Frank
I have dataset which has event_date, firm_a, firm_b, person_ax (who are in firm_a) and person_by (who are in firm_b).
I'm trying to identify for each event_date, which individual shares position in both firm_a and firm_b.
For example, at event_date "5-Feb-08", individual "d" and "e" share position in both firm_a and firm_b. And I want to keep the observation with shared individual, like the following:
str9 event_date byte(firm_a firm_b) str1(person_ax person_by)
"5-Feb-08" 1 2 "d" "d"
"5-Feb-08" 1 2 "e" "e"
Much appreciated for your time and help.
I'm new the Stata and Statalist, please feel free to ask any questions if I've not make myself clear.

Cheers,
Frank
Code:
* Example generated by -dataex-. For more info, type help dataex clear input str9 event_date byte(firm_a firm_b) str1(person_ax person_by) "5-Feb-08" 1 2 "a" "d" "5-Feb-08" 1 2 "b" "h" "5-Feb-08" 1 2 "c" "j" "5-Feb-08" 1 2 "d" "e" "5-Feb-08" 1 2 "e" "p" "5-Feb-08" 1 2 "f" "k" "27-Feb-08" 3 4 "a" "b" "27-Feb-08" 3 4 "b" "j" "27-Feb-08" 3 4 "j" "o" "27-Feb-08" 3 4 "d" "g" "27-Feb-08" 3 4 "q" "m" "28-Feb-08" 5 6 "d" "f" "28-Feb-08" 5 6 "c" "j" "28-Feb-08" 5 6 "w" "c" "28-Feb-08" 5 6 "t" "w" "28-Feb-08" 5 6 "y" "n" end

Comment