Dear all,
Greetings!
I am struggling to find a way to count unique firms which could change their ownership type and industry throughout the time period in my dataset (2012-2018). I have created a unique id for each firm, but I am stuck at how I can identify whether there were some changes throughout the years.
Any advice will be greatly appreciated!
(okfs=ownership type; ind=industry)
Greetings!
I am struggling to find a way to count unique firms which could change their ownership type and industry throughout the time period in my dataset (2012-2018). I have created a unique id for each firm, but I am stuck at how I can identify whether there were some changes throughout the years.
Any advice will be greatly appreciated!
(okfs=ownership type; ind=industry)
Code:
clear input float(id year) byte okfs float ind 1 2014 34 60 1 2015 34 51 1 2016 34 46 1 2017 34 46 1 2018 34 46 2 2012 23 70 2 2013 23 70 2 2018 23 68 3 2016 24 41 3 2017 24 41 3 2018 24 41 4 2017 24 41 5 2016 34 45 5 2017 34 45 6 2016 34 68 6 2017 34 46 7 2017 24 56 7 2018 24 56 8 2017 24 41 9 2016 24 47 9 2017 24 47 10 2016 34 46 10 2017 34 46 10 2018 34 46 11 2016 24 47 12 2013 21 85 13 2016 24 41 14 2016 24 47 14 2017 24 25 14 2018 24 25 15 2016 24 1 15 2017 24 1 16 2016 23 1 16 2017 27 1 16 2018 27 1 17 2016 23 1 17 2017 27 1 17 2018 27 1 18 2016 24 47 18 2017 24 47 18 2018 24 47 19 2016 24 41 20 2016 34 45 20 2017 34 45 20 2018 34 45 21 2016 24 81 21 2017 24 81 21 2018 24 81 22 2016 34 70 23 2016 24 81 24 2016 24 46 25 2016 24 46 25 2017 24 46 26 2016 23 46 27 2016 24 46 27 2017 24 46 28 2014 21 85 28 2015 21 85 28 2016 21 88 28 2017 21 88 28 2018 21 88 29 2016 24 41 29 2017 24 41 30 2016 24 56 30 2017 24 56 30 2018 24 56 31 2016 24 46 31 2017 24 46 31 2018 24 46 32 2016 34 3 32 2017 34 3 33 2016 34 71 33 2017 34 71 33 2018 34 71 34 2016 23 1 34 2017 27 1 34 2018 27 1 35 2016 34 79 35 2017 34 79 35 2018 34 79 36 2016 24 8 37 2016 24 46 38 2015 18 91 38 2017 18 94 38 2018 18 94 39 2016 24 45 39 2017 24 45 39 2018 24 45 40 2016 34 28 40 2017 34 28 40 2018 34 28 41 2016 24 41 42 2017 23 46 43 2016 24 22 43 2017 24 22 43 2018 24 46 44 2016 34 74 44 2017 34 71 45 2016 34 41 45 2018 34 41 end
Comment