Dear all,
For my thesis I want to pair European firms with each other. However, I'm struggling to make the firm pairs needed.
I want to do the following:
-The main criteria is that total assets of the firms in the pair are the closest per year (so the largest firm is matched with the second largest firm)
-In addition, firms need to be in different countries with the same three digit SIC code.
-Moreover, a firm can not be paired more than once (so if firm A and B are matched with each other, A and B need to be deleted and cannot be matched again with other firms).
I sorted the data by total assets and year, but I don't know how to write the code for the loop. Especially, removing the firms once paired is a challenge.
I would greatly appreciate any help.
Kind regards,
Jordan van de Ven
For my thesis I want to pair European firms with each other. However, I'm struggling to make the firm pairs needed.
I want to do the following:
-The main criteria is that total assets of the firms in the pair are the closest per year (so the largest firm is matched with the second largest firm)
-In addition, firms need to be in different countries with the same three digit SIC code.
-Moreover, a firm can not be paired more than once (so if firm A and B are matched with each other, A and B need to be deleted and cannot be matched again with other firms).
I sorted the data by total assets and year, but I don't know how to write the code for the loop. Especially, removing the firms once paired is a challenge.
I would greatly appreciate any help.
Kind regards,
Jordan van de Ven