Dear fellow Stata users,
I am working on a panel data and wanted to pair a firm with its peers that share similar product lines and geographic markets. Below is an illustrative dataset. For each firm, it details the top 3 product lines and the top 3 geographic regions. My matching criteria are as follows: in a given year, for each focal firm, a competitive peer must share at least two out of three top product lines and at least two out of three top regions.
In this dataset, in year 2001, A and C are considered peers, and B & C are peers, but A and C are not peers.
I wonder how to conduct the pairing in STATA. I want all firms meeting the above criteria identified as peers of a target firm.
Thank you in advance for any help you can provide.
Comment