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

constructing a rival analysis

$
0
0
Dear Stata Listers

I need help with constructing a rival analysis base on the dataset include different firms in various industries invested in countries in prior years, look like:

year firm-id industry markets

1999 A textile china

1999 A service china

2000 A textile Korea

2000 A textile Korea

2000 A service China

1999 B textile Korea

1999 B textile China

2000 B service China

2000 B Textile Korea

How can I get an indicator shows that, for firm A, firm B in the same industry enter the same market at the same year? Similarly, for firm B, the indicator marks 1 when firms in the same industry (for example: firm A) enter the same market at the same year?

If no rival enter the same market at the same year, the indicator reveal 0.

Expected result look like:


year firm-id industry markets rival-enter

1999 A textile china 1

1999 A service china 0

2000 A textile Korea 1

2000 A textile Korea 1

2000 A service China 1

1999 B textile Korea 0

1999 B textile China 1

2000 B service China 1

2000 B Textile Korea 1


THANKS FOR YOUR HELP!

Viewing all articles
Browse latest Browse all 65121

Trending Articles



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