Dear Profs and Colleagues,
I need to compute this fraction:

IMM: immigrant share from origin country O during the period t: 2010-2019.
Native d, t-1: Native population in 7 regions (d) during t-1.
Numerator:
Denominator:
How can I merge data and compute this fraction? Any ideas are appreciated.
Cheers,
Paris
************************************************** ***************************************
And we are honored to listen to David Card in Lisbon, Portugal this week
I need to compute this fraction:
IMM: immigrant share from origin country O during the period t: 2010-2019.
Native d, t-1: Native population in 7 regions (d) during t-1.
Numerator:
Code:
* Example generated by -dataex-. For more info, type help dataex clear input str24 country int year long IMM "Spain" 2010 8918 "France" 2010 5111 "Italy" 2010 5067 "United Kingdom" 2010 17196 "Ukraine" 2010 49487 "Romania" 2010 36830 "Moldavia" 2010 15632 "Other European countries" 2010 38593 "Angola" 2010 23233 "Cape Verde" 2010 43510 "Guinea Bissau" 2010 19304 "Mozambique" 2010 3109 "Sao Tome and Principe" 2010 10175 "Other African countries" 2010 7748 "Brazil" 2010 119195 "Other American countries" 2010 8677 "China" 2010 15600 "India" 2010 5213 "Nepal" 2010 796 "Other Asian countries" 2010 9352 "Spain" 2011 9310 "France" 2011 5293 "Italy" 2011 5338 "United Kingdom" 2011 17675 "Ukraine" 2011 48010 "Romania" 2011 39312 "Moldavia" 2011 13586 "Other European countries" 2011 39004 "Angola" 2011 21329 "Cape Verde" 2011 43475 "Guinea Bissau" 2011 18131 "Mozambique" 2011 2995 "Sao Tome and Principe" 2011 10274 "Other African countries" 2011 7789 "Brazil" 2011 111295 "Other American countries" 2011 8877 "China" 2011 16595 "India" 2011 5316 "Nepal" 2011 1144 "Other Asian countries" 2011 9645 "Spain" 2012 9216 "France" 2012 5201 "Italy" 2012 5222 "United Kingdom" 2012 16649 "Ukraine" 2012 44050 "Romania" 2012 35216 "Moldavia" 2012 11503 "Other European countries" 2012 37023 "Angola" 2012 19873 "Cape Verde" 2012 42388 "Guinea Bissau" 2012 17462 "Mozambique" 2012 2901 "Sao Tome and Principe" 2012 10174 "Other African countries" 2012 8078 "Brazil" 2012 105518 "Other American countries" 2012 9022 "China" 2012 17186 "India" 2012 5574 "Nepal" 2012 1702 "Other Asian countries" 2012 10200 "Spain" 2013 9541 "France" 2013 5268 "Italy" 2013 5121 "United Kingdom" 2013 16471 "Ukraine" 2013 41074 "Romania" 2013 34204 "Moldavia" 2013 9968 "Other European countries" 2013 37345 "Angola" 2013 19967 "Cape Verde" 2013 42011 "Guinea Bissau" 2013 17574 "Mozambique" 2013 2825 "Sao Tome and Principe" 2013 10169 "Other African countries" 2013 8299 "Brazil" 2013 91238 "Other American countries" 2013 9058 "China" 2013 18445 "India" 2013 5983 "Nepal" 2013 2551 "Other Asian countries" 2013 10826 "Spain" 2014 9692 "France" 2014 6541 "Italy" 2014 5328 "United Kingdom" 2014 16559 "Ukraine" 2014 37809 "Romania" 2014 31505 "Moldavia" 2014 8458 "Other European countries" 2014 38044 "Angola" 2014 19478 "Cape Verde" 2014 40563 "Guinea Bissau" 2014 17728 "Mozambique" 2014 2813 "Sao Tome and Principe" 2014 10028 "Other African countries" 2014 8338 "Brazil" 2014 85288 "Other American countries" 2014 9104 "China" 2014 21042 "India" 2014 6372 "Nepal" 2014 3543 "Other Asian countries" 2014 11535 end
Denominator:
Code:
* Example generated by -dataex-. For more info, type help dataex clear input int D byte region long local_pop 2009 1 3660027 2009 2 2276922 2009 3 2569821 2009 4 737925 2009 5 369714 2009 6 243259 2009 7 258837 2010 1 3650003 2010 2 2271508 2010 3 2594130 2010 4 733699 2010 5 376756 2010 6 243375 2010 7 260576 2011 1 3641191 2011 2 2267769 2011 3 2605266 2011 4 729568 2011 5 382890 2011 6 243535 2011 7 260910 2012 1 3628217 2012 2 2260102 2012 3 2610494 2012 4 725674 2012 5 389095 2012 6 243429 2012 7 259801 2013 1 3607664 2013 2 2244571 2013 3 2612571 2013 4 719157 2013 5 391772 2013 6 242591 2013 7 257398 2014 1 3586851 2014 2 2227815 2014 3 2614567 2014 4 712295 2014 5 392933 2014 6 241024 2014 7 254011 2015 1 3570236 2015 2 2213110 2015 3 2626870 2015 4 705638 2015 5 392712 2015 6 239178 2015 7 250335 2016 1 3556744 2016 2 2197865 2016 3 2635958 2016 4 698893 2016 5 389192 2016 6 237529 2016 7 247368 2017 1 3545137 2017 2 2182753 2017 3 2636948 2017 4 691623 2017 5 385887 2017 6 236093 2017 7 245003 2018 1 3532359 2018 2 2168704 2018 3 2613291 2018 4 684337 2018 5 380445 2018 6 234825 2018 7 243202 2019 1 3518708 2019 2 2150940 2019 3 2573936 2019 4 676251 2019 5 370046 2019 6 233614 2019 7 241976 end
How can I merge data and compute this fraction? Any ideas are appreciated.
Cheers,
Paris
************************************************** ***************************************
And we are honored to listen to David Card in Lisbon, Portugal this week

Comment