Dear Profs and Colleagues,
I am going to generate the share of each nationality (nacio) by firm (i )and year (t).
firm id= NPC_FIC ,year=2010-2019.
For example, I need to reach that the share of UA is 0.05, the share of ES is 0.09 so on and so forth.
In one year a firm id might appear several times because nacio is designated to the nationality of individuals so its normal that one firm may have several workers with different or the same nationality.
any ideas appreciated
Cheers,
Paris
I am going to generate the share of each nationality (nacio) by firm (i )and year (t).
firm id= NPC_FIC ,year=2010-2019.
Code:
* Example generated by -dataex-. For more info, type help dataex clear input double(year NPC_FIC) str6 nacio 2010 500000001 "PT" 2010 500000001 "PT" 2010 500000001 "PT" 2010 500000002 "PT" 2010 500000002 "PT" 2010 500000002 "PT" 2010 500000002 "PT" 2011 500000002 "AF" 2011 500000002 "PT" 2011 500000002 "PT" 2011 500000002 "PT" 2012 500000002 "PT" 2012 500000002 "PT" 2012 500000002 "PT" 2012 500000002 "AF" 2013 500000002 "PT" 2013 500000002 "PT" 2014 500000002 "PT" 2015 500000002 "PT" 2015 500000002 "PT" 2016 500000002 "PT" 2016 500000002 "PT" 2017 500000002 "PT" 2017 500000002 "PT" 2010 500000033 "PT" 2010 500000033 "PT" 2011 500000033 "PT" 2011 500000033 "ES" 2012 500000033 "PT" 2012 500000033 "PT" 2013 500000033 "ES" 2014 500000033 "PT" 2015 500000033 "PT" 2015 500000033 "PT" 2016 500000033 "PT" 2017 500000033 "PT" 2018 500000033 "PT" 2019 500000033 "PT" 2010 500000050 "ES" 2010 500000050 "ES" 2011 500000050 "ES" 2012 500000050 "PT" 2013 500000050 "PT" 2014 500000050 "PT" 2014 500000050 "PT" 2015 500000050 "PT" 2015 500000050 "PT" 2019 500000073 "PT" 2010 500000083 "AF" 2011 500000083 "AF" 2012 500000083 "AF" 2013 500000083 "AF" 2014 500000083 "AF" 2015 500000083 "AF" 2016 500000083 "AF" 2017 500000083 "PT" 2018 500000083 "PT" 2018 500000083 "PT" 2019 500000083 "PT" 2019 500000083 "PT" 2015 500000101 "PT" 2016 500000101 "AF" 2017 500000101 "AF" 2018 500000101 "PT" 2019 500000101 "GB" 2010 500000104 "UA" 2011 500000106 "PT" 2011 500000113 "PT" 2012 500000113 "PT" 2013 500000113 "PT" 2014 500000113 "PT" 2010 500000119 "PT" 2010 500000119 "PT" 2010 500000119 "PT" 2010 500000119 "PT" 2011 500000119 "UA" end
In one year a firm id might appear several times because nacio is designated to the nationality of individuals so its normal that one firm may have several workers with different or the same nationality.
any ideas appreciated
Cheers,
Paris
Comment