Dear Profs and Colleagues,
I have a panel data set, which means that for a period of ten years, the id here is (NPC_FIC) repeats. I need to determine the unique total number of employees (pempl) during the period of study. Basically, there are a certain number of employees who work among these firms during these 10 years. I need to know how many there are. The point is that some firms may for some years reduce/ increase the amount of their employees. So dropping duplicates is not a good idea.
The second question is I am going to determine firms that have:
1- have 10 or few than 10 employees
2- between 10-250 employees
3- more than 250 employees
Any ideas are appreciated.
Cheers,
Paris
I have a panel data set, which means that for a period of ten years, the id here is (NPC_FIC) repeats. I need to determine the unique total number of employees (pempl) during the period of study. Basically, there are a certain number of employees who work among these firms during these 10 years. I need to know how many there are. The point is that some firms may for some years reduce/ increase the amount of their employees. So dropping duplicates is not a good idea.
Code:
* Example generated by -dataex-. For more info, type help dataex clear input double(year NPC_FIC pempl) 2010 500000001 3 2010 500000002 5 2011 500000002 4 2012 500000002 5 2013 500000002 4 2014 500000002 1 2015 500000002 2 2016 500000002 2 2017 500000002 2 2018 500000002 1 2010 500000033 2 2011 500000033 2 2012 500000033 2 2013 500000033 1 2014 500000033 1 2015 500000033 2 2016 500000033 1 2017 500000033 1 2018 500000033 1 2019 500000033 1 2010 500000050 2 2011 500000050 1 2012 500000050 1 2013 500000050 1 2014 500000050 2 2015 500000050 2 2016 500000069 1 2017 500000069 1 2019 500000073 2 2010 500000083 1 2011 500000083 1 2012 500000083 1 2013 500000083 1 2014 500000083 1 2015 500000083 1 2016 500000083 1 2017 500000083 1 2018 500000083 2 2019 500000083 2 2015 500000101 1 2016 500000101 1 2017 500000101 1 2018 500000101 1 2019 500000101 1 2010 500000104 2 2011 500000106 1 2011 500000113 1 2012 500000113 1 2013 500000113 1 2014 500000113 1 2010 500000119 8 2011 500000119 9 2012 500000119 8 2010 500000121 2 2011 500000150 1 2012 500000150 1 2013 500000150 1 2014 500000150 1 2010 500000156 2 2016 500000156 1 2017 500000156 1 2018 500000156 1 2019 500000156 1 2010 500000157 4 2011 500000157 3 2012 500000157 2 2010 500000165 4 2011 500000165 4 2012 500000165 3 2013 500000165 3 2014 500000165 3 2015 500000165 3 2016 500000165 3 2017 500000165 3 2010 500000180 1 2010 500000198 3 2011 500000198 3 2012 500000198 2 2013 500000198 2 2014 500000198 2 2015 500000198 2 2016 500000198 2 2017 500000198 2 2010 500000201 1 2011 500000201 1 2012 500000201 1 2013 500000201 1 2010 500000204 2 2011 500000204 2 2012 500000204 2 2013 500000204 3 2014 500000204 3 2015 500000204 3 2016 500000204 3 2017 500000204 3 2018 500000204 1 2019 500000204 2 2010 500000212 1 2011 500000212 1 2012 500000212 1 end
1- have 10 or few than 10 employees
2- between 10-250 employees
3- more than 250 employees
Any ideas are appreciated.
Cheers,
Paris
Comment