Hello,
My raw data on subsidiaries and their parent companies is structured in two columns like this:
As you could see, Company3 is actually the ultimate parent, while Company2 is an intermediate parent, with Company1 being the lowest in corporate hierarchy. This is unfortunately how my dataset was delivered to me.
What I ultimately would like to have is:
So I could remove row 2 by eliminating duplicates later.
I know that this can be solved by manually removing row 2 and then using vlookup in Stata. However my raw dataset is not small. vlookup also does not work in the raw setup, giving the following error: "there are multiple observations with different Parent within Company."
Thank you for your help.
My raw data on subsidiaries and their parent companies is structured in two columns like this:
Code:
Company Parent Company1 Company2 Company1 Company3 Company2 Company3
What I ultimately would like to have is:
Code:
Company Parent UltimateParent Company1 Company2 Company3 Company1 Company3 Company3 Company2 Company3 Company3
I know that this can be solved by manually removing row 2 and then using vlookup in Stata. However my raw dataset is not small. vlookup also does not work in the raw setup, giving the following error: "there are multiple observations with different Parent within Company."
Thank you for your help.
Comment