Hello there,
I need to create a rank variable that follows this logic "In this paper, the share of patents held by the four
major innovators within each technological class is used (C4)" from Malerba and Orsenigo 1995. Thus I need to rank each country in each year by its number of patents in each technological class.
I already looked all the threads concerning a similar problem, looked at the
function by it doesn't seem to be my case or maybe I am missing something here.
I have 6 countries, so I need a rank that goes from 1 to 6, using other functions or codes like in
I got rank up to 20 which evidently is not the case
Can somebody tell me how can I rank countries by their number of patents in each technological class for each year? or at least rank each country by technological class.
here a snapshot of my data sourced from OECD.
Thanks a lot,
Dalila Ribaudo
I need to create a rank variable that follows this logic "In this paper, the share of patents held by the four
major innovators within each technological class is used (C4)" from Malerba and Orsenigo 1995. Thus I need to rank each country in each year by its number of patents in each technological class.
I already looked all the threads concerning a similar problem, looked at the
Code:
-egen- rank
I have 6 countries, so I need a rank that goes from 1 to 6, using other functions or codes like in
HTML Code:
https://www.statalist.org/forums/forum/general-stata-discussion/general/1349895-keeping-variables-with-the-highest-three-values
Can somebody tell me how can I rank countries by their number of patents in each technological class for each year? or at least rank each country by technological class.
here a snapshot of my data sourced from OECD.
Thanks a lot,
Dalila Ribaudo
Code:
----------------------- copy starting from the next line ----------------------- * Example generated by -dataex-. For more info, type help dataex clear input str75 country int time str67 tech_class_1dig float nr_pat "United Kingdom" 2018 "IPC D: Textiles; Paper" 17.3366 "United Kingdom" 2017 "IPC D: Textiles; Paper" 28.9404 "United Kingdom" 2015 "IPC D: Textiles; Paper" 31.0263 "France" 2018 "IPC D: Textiles; Paper" 31.8852 "United Kingdom" 2016 "IPC D: Textiles; Paper" 35.9336 "Italy" 2018 "IPC D: Textiles; Paper" 57.8329 "France" 2015 "IPC D: Textiles; Paper" 69.577 "France" 2016 "IPC D: Textiles; Paper" 72.9793 "France" 2017 "IPC D: Textiles; Paper" 86.7161 "Italy" 2017 "IPC D: Textiles; Paper" 105.8811 "Italy" 2016 "IPC D: Textiles; Paper" 111.6228 "Italy" 2015 "IPC D: Textiles; Paper" 122.51 "Italy" 2018 "IPC C: Chemistry; Metallurgy" 123.3688 "United Kingdom" 2018 "IPC E: Fixed Constructions" 124.5273 "United States" 2018 "IPC D: Textiles; Paper" 137.4295 "France" 2018 "IPC E: Fixed Constructions" 170.3693 "Italy" 2018 "IPC E: Fixed Constructions" 176.7254 "Italy" 2015 "IPC E: Fixed Constructions" 211.9131 "United Kingdom" 2018 "IPC C: Chemistry; Metallurgy" 227.2309 "Italy" 2017 "IPC E: Fixed Constructions" 230.902 "Germany" 2018 "IPC D: Textiles; Paper" 242.0335 "United States" 2015 "IPC D: Textiles; Paper" 246.1344 "United Kingdom" 2017 "IPC E: Fixed Constructions" 248.3734 "United States" 2017 "IPC D: Textiles; Paper" 260.7929 "United Kingdom" 2016 "IPC E: Fixed Constructions" 261.4271 "Italy" 2016 "IPC E: Fixed Constructions" 262.5896 "United States" 2016 "IPC D: Textiles; Paper" 266.32 "France" 2016 "IPC E: Fixed Constructions" 278.8079 "France" 2015 "IPC E: Fixed Constructions" 291.5966 "United Kingdom" 2015 "IPC E: Fixed Constructions" 293.0544 "France" 2017 "IPC E: Fixed Constructions" 301.555 "Germany" 2017 "IPC D: Textiles; Paper" 313.9293 "France" 2018 "IPC C: Chemistry; Metallurgy" 319.1765 "Italy" 2018 "IPC H: Electricity" 321.4232 "Italy" 2015 "IPC C: Chemistry; Metallurgy" 329.0085 "Italy" 2018 "IPC G: Physics" 337.0337 "Italy" 2017 "IPC C: Chemistry; Metallurgy" 341.176 "Germany" 2016 "IPC D: Textiles; Paper" 343.5705 "Italy" 2016 "IPC C: Chemistry; Metallurgy" 348.6883 "Germany" 2015 "IPC D: Textiles; Paper" 352.5942 "Italy" 2018 "IPC F: Mechanical Engineering; Lighting; Heating; Weapons; Blasting" 376.6061 "Italy" 2015 "IPC H: Electricity" 421.8856 "Italy" 2017 "IPC H: Electricity" 435.3698 "Italy" 2015 "IPC G: Physics" 438.8865 "Japan" 2018 "IPC E: Fixed Constructions" 472.8951 "Japan" 2018 "IPC D: Textiles; Paper" 475.1555 "Italy" 2016 "IPC G: Physics" 476.2838 "Italy" 2018 "IPC A: Human Necessities" 476.5641 "United Kingdom" 2018 "IPC F: Mechanical Engineering; Lighting; Heating; Weapons; Blasting" 497.4443 "United Kingdom" 2018 "IPC A: Human Necessities" 507.8799 "Italy" 2017 "IPC G: Physics" 522.9263 "Italy" 2016 "IPC H: Electricity" 543.896 "Japan" 2016 "IPC D: Textiles; Paper" 554.4405 "Japan" 2015 "IPC D: Textiles; Paper" 571.3907 "United Kingdom" 2018 "IPC B: Performing Operations; Transporting" 574.3645 "France" 2018 "IPC A: Human Necessities" 576.9227 "United Kingdom" 2017 "IPC C: Chemistry; Metallurgy" 581.2652 "Japan" 2016 "IPC E: Fixed Constructions" 591.1311 "Japan" 2015 "IPC E: Fixed Constructions" 603.3491 "Italy" 2017 "IPC F: Mechanical Engineering; Lighting; Heating; Weapons; Blasting" 618.1938 "United Kingdom" 2018 "IPC H: Electricity" 618.6688 "Japan" 2017 "IPC D: Textiles; Paper" 627.3081 "United Kingdom" 2016 "IPC C: Chemistry; Metallurgy" 629.2444 "Japan" 2017 "IPC E: Fixed Constructions" 635.5335 "Italy" 2016 "IPC F: Mechanical Engineering; Lighting; Heating; Weapons; Blasting" 664.6117 "Italy" 2015 "IPC F: Mechanical Engineering; Lighting; Heating; Weapons; Blasting" 667.2909 "United Kingdom" 2017 "IPC F: Mechanical Engineering; Lighting; Heating; Weapons; Blasting" 669.1438 "United Kingdom" 2015 "IPC C: Chemistry; Metallurgy" 694.9429 "Germany" 2018 "IPC E: Fixed Constructions" 696.0637 "United Kingdom" 2015 "IPC F: Mechanical Engineering; Lighting; Heating; Weapons; Blasting" 707.9298 "United Kingdom" 2016 "IPC F: Mechanical Engineering; Lighting; Heating; Weapons; Blasting" 718.7183 "France" 2018 "IPC F: Mechanical Engineering; Lighting; Heating; Weapons; Blasting" 723.4854 "Italy" 2018 "IPC B: Performing Operations; Transporting" 774.9451 "Italy" 2015 "IPC A: Human Necessities" 842.7225 "France" 2016 "IPC C: Chemistry; Metallurgy" 852.4978 "Germany" 2015 "IPC E: Fixed Constructions" 858.2121 "United States" 2018 "IPC E: Fixed Constructions" 883.0867 "United Kingdom" 2018 "IPC G: Physics" 888.5177 "Germany" 2018 "IPC C: Chemistry; Metallurgy" 888.6639 "Italy" 2017 "IPC A: Human Necessities" 919.1489 "Germany" 2017 "IPC E: Fixed Constructions" 946.7127 "France" 2015 "IPC C: Chemistry; Metallurgy" 947.0167 "France" 2017 "IPC C: Chemistry; Metallurgy" 947.9912 "United Kingdom" 2016 "IPC B: Performing Operations; Transporting" 962.3157 "Italy" 2016 "IPC A: Human Necessities" 989.2037 "Germany" 2016 "IPC E: Fixed Constructions" 991.714 "United Kingdom" 2017 "IPC B: Performing Operations; Transporting" 1002.6637 "United Kingdom" 2015 "IPC B: Performing Operations; Transporting" 1010.9802 "France" 2018 "IPC G: Physics" 1030.4623 "Italy" 2015 "IPC B: Performing Operations; Transporting" 1075.2632 "United Kingdom" 2017 "IPC H: Electricity" 1117.382 "United Kingdom" 2016 "IPC H: Electricity" 1133.6638 "France" 2018 "IPC H: Electricity" 1134.0883 "France" 2018 "IPC B: Performing Operations; Transporting" 1135.279 "France" 2016 "IPC F: Mechanical Engineering; Lighting; Heating; Weapons; Blasting" 1207.3523 "United Kingdom" 2015 "IPC H: Electricity" 1213.8413 "United Kingdom" 2017 "IPC A: Human Necessities" 1215.051 "United Kingdom" 2015 "IPC A: Human Necessities" 1222.4565 "United Kingdom" 2016 "IPC A: Human Necessities" 1238.7816 "France" 2017 "IPC F: Mechanical Engineering; Lighting; Heating; Weapons; Blasting" 1257.149 end
Comment