Quantcast
Channel: Statalist
Viewing all articles
Browse latest Browse all 65121

Pairing firms with loop and restrictions

$
0
0
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

Viewing all articles
Browse latest Browse all 65121

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>