I haven't used Stata in a while now and am a bit ashamed that I don't know how to proceed with this fairly easy task.
Data sample (I leave out other variables for illustrations purpose)
Acq_Boardex_ID is a company ID. Acq_Isin should be the same for each company (Acq_Boardex_ID) in my sample.
By Acq_Boardex_ID, I would like to replace the Acq_Isin in cases where _merge = 1 with the Acq_Isin from the company where _merge = 3.
This is probably a super easy task but due to my rusty Stata knowledge, I haven't really got any further with a solution and appreciate any help.
Best
Data sample (I leave out other variables for illustrations purpose)
Code:
* Example generated by -dataex-. For more info, type help dataex clear input long Acq_Boardex_ID str12 Acq_Isin byte _merge 26113 "AU000000RMD6" 1 26113 "AU000000RMD6" 1 26113 "AU000000RMD6" 1 26113 "AU000000RMD6" 1 26113 "AU000000RMD6" 1 26113 "US7611521078" 3 26113 "US7611521078" 3 26113 "US7611521078" 3 26113 "US7611521078" 3 26113 "US7611521078" 3 end label values _merge _merge label def _merge 1 "Master only (1)", modify label def _merge 3 "Matched (3)", modify
By Acq_Boardex_ID, I would like to replace the Acq_Isin in cases where _merge = 1 with the Acq_Isin from the company where _merge = 3.
This is probably a super easy task but due to my rusty Stata knowledge, I haven't really got any further with a solution and appreciate any help.
Best

Comment