Hi all,
I have trouble to estimate/simulate the effects of a tariff on imports to Sweden. So, I'm only looking at Sweden's imports from other countries. I have to simulate the effect of this tariff, but I am stuck because when using the ppml command it throws out every variable. I have included exporter and importer fixed effects which it just disregards. The data is cross sectional for 59 countries (imports to Sweden from 59 countries). I have tried to attached the code below and a picture of the error I get. I also attached my dataset if it is useful (sorry if it's not).
Would be very grateful for some advice!
Kind regards,
Elin
Overview of the dataset (note same dataset as in the excel sheet)
I have trouble to estimate/simulate the effects of a tariff on imports to Sweden. So, I'm only looking at Sweden's imports from other countries. I have to simulate the effect of this tariff, but I am stuck because when using the ppml command it throws out every variable. I have included exporter and importer fixed effects which it just disregards. The data is cross sectional for 59 countries (imports to Sweden from 59 countries). I have tried to attached the code below and a picture of the error I get. I also attached my dataset if it is useful (sorry if it's not).
Would be very grateful for some advice!
Kind regards,
Elin
Code:
Delete all clear all import excel "FULL DATASET.xlsx", firstrow **Generate ln distance gen ln_dist = ln(Distancedistw) ***STATA commands to create importer- and exporter fixed effects tab (Partner), gen(ex_FE) tab (Reportcountry), gen(im_FE) ***PPML ppml ValueEUR RTA ln_dist ex_FE* im_FE*
Overview of the dataset (note same dataset as in the excel sheet)
Code:
Year Report CODE Report SHORT Report country Product Partner CODE Partner SHORT Partner Value USD Value EUR GDP in USD GDP in EUR Distance (distw) RTA MFN Intensity of embedded CO2 emission in tonnes per million USD Intensity of embedded CO2 emission in tonnes per million EUR Intensity of embedded CO2 emission in tonnes per EUR Price other EUA in TCO2 (non EU ETS) Price EUA Average price 2023 Price EUA commission prognose 2030 CBAM Average EUA CBAM commission prognose EUA 2017 752 SWE Sweden Iron and Steel 32 ARG Argentina 660514,007 584686,999 6,4363E+11 5,6974E+11 12404,68 0 1 644,02 570,086504 570086504 0 49,6 60 48361,415 58501,7117 2017 752 SWE Sweden Iron and Steel 36 AUS Australia 901702,407 798186,971 1,3269E+12 1,1746E+12 15385,4 0 1 1016,115 899,464998 899464998 0 49,6 60 55893,5006 67613,1055 2017 752 SWE Sweden Iron and Steel 40 AUT Austria 267064236 236405262 4,1726E+11 3,6936E+11 1228,473 1 0 677,136 599,400787 599400787 0 49,6 60 0 0 2017 752 SWE Sweden Iron and Steel 56 BEL Belgium 219816389 194581468 5,0276E+11 4,4505E+11 1151,5 1 0 583,353 516,384076 516384076 0 49,6 60 0 0 2017 752 SWE Sweden Iron and Steel 76 BRA Brazil 49740595,6 44030375,2 2,0635E+12 1,8266E+12 10185,49 0 1 1466,937 1298,53263 1298532632 0 49,6 60 1462,79059 1769,50475 2017 752 SWE Sweden Iron and Steel 100 BGR Bulgaria 2485248,41 2199941,89 5,931E+10 5,2501E+10 1912,318 1 0 697,45 617,38274 617382740 0 49,6 60 0 0 2017 752 SWE Sweden Iron and Steel 124 CAN Canada 11573879 10245197,7 1,6493E+12 1,4599E+12 6347,801 1 0 652,048 577,19289 577192890 0 49,6 60 2794,35969 3380,27382 2017 752 SWE Sweden Iron and Steel 152 CHL Chile 35393,05 31329,9279 2,7615E+11 2,4445E+11 12956,19 1 0 416,803 368,954016 368954016 0 49,6 60 584109,841 706584,485 2017 752 SWE Sweden Iron and Steel 156 CHN China 339405990 300442182 1,231E+13 1,0897E+13 7276,972 0 1 1521,845 1347,13719 1347137194 0 49,6 60 222,39888 269,030903 2017 752 SWE Sweden Iron and Steel 170 COL Colombia 40666,849 35998,2947 3,1187E+11 2,7606E+11 9491,131 1 0 562,896 498,275539 498275539 0 49,6 60 686545,486 830498,571 2017 752 SWE Sweden Iron and Steel 191 HRV Croatia 2165773,39 1917142,61 5,6062E+10 4,9626E+10 1519,272 1 0 268,231 237,438081 237438081 0 49,6 60 0 0 2017 752 SWE Sweden Iron and Steel 196 CYP Cyprus 5383259,48 4765261,29 2,2871E+10 2,0245E+10 2955,676 1 0 629 556,7908 556790800 0 49,6 60 0 0 2017 752 SWE Sweden Iron and Steel 203 CZE Czechia 181997040 161103780 2,1863E+11 1,9353E+11 1009,355 1 0 716,718 634,438774 634438774 0 49,6 60 0 0 2017 752 SWE Sweden Iron and Steel 208 DNK Denmark 446291477 395057216 3,3212E+11 2,9399E+11 450,0833 1 0 327,052 289,50643 289506430 0 49,6 60 0 0 2017 752 SWE Sweden Iron and Steel 233 EST Estonia 37557534,3 33245929,4 2,6924E+10 2,3833E+10 595,361 1 0 695,551 615,701745 615701745 0 49,6 60 0 0 2017 752 SWE Sweden Iron and Steel 251 FRA France 348624590 308602487 2,5952E+12 2,2972E+12 1616,322 1 0 686,378 607,581806 607581806 0 49,6 60 0 0 2017 752 SWE Sweden Iron and Steel 276 DEU Germany 1738284416 1538729365 3,6908E+12 3,2671E+12 929,3204 1 0 782,549 692,712375 692712375 0 49,6 60 0 0 2017 752 SWE Sweden Iron and Steel 300 GRC Greece 7502271,85 6641011,04 1,9984E+11 1,769E+11 2353,035 1 0 1110,28 982,819856 982819856 0 49,6 60 0 0 2017 752 SWE Sweden Iron and Steel 344 HKG Hong Kong SAR 7146231,83 6325844,42 3,4127E+11 3,021E+11 8368,679 0 1 922,535 816,627982 816627982 0 49,6 60 6403,05787 7745,63452 2017 752 SWE Sweden Iron and Steel 348 HUN Hungary 13574406,7 12016064,8 1,4311E+11 1,2668E+11 1315,378 1 0 626,364 554,457413 554457413 0 49,6 60 0 0 2017 752 SWE Sweden Iron and Steel 352 ISL Iceland 555038,03 491319,664 2,4728E+10 2,1889E+10 2047,326 1 0 191,905 169,874306 169874306 0 49,6 60 0 0 2017 752 SWE Sweden Iron and Steel 699 IND India 59515406 52683037,4 2,6515E+12 2,3471E+12 6308,107 0 1 2579,465 2283,34242 2283342418 0 49,6 60 2149,72009 2600,46785 2017 752 SWE Sweden Iron and Steel 360 IDN Indonesia 5970409,08 5285006,12 1,0156E+12 8,9903E+11 10632,05 0 1 763,465 675,819218 675819218 0 49,6 60 6342,59118 7672,48934 2017 752 SWE Sweden Iron and Steel 372 IRL Ireland 2625531,46 2324120,45 3,3724E+11 2,9853E+11 1549,426 1 0 260,699 230,770755 230770755 0 49,6 60 0 0 2017 752 SWE Sweden Iron and Steel 376 ISR Israel 601447,46 532401,292 3,5825E+11 3,1712E+11 3315,602 1 0 287,03 254,078956 254078956 0 49,6 60 23670,7093 28633,9226 2017 752 SWE Sweden Iron and Steel 380 ITA Italy 295898321 261929194 1,9618E+12 1,7366E+12 1833,431 1 0 541,897 479,687224 479687224 0 49,6 60 0 0 2017 752 SWE Sweden Iron and Steel 392 JPN Japan 41947678,9 37132085,3 4,9308E+12 4,3648E+12 8226,76 0 1 959,6 849,43792 849437920 0 49,6 60 1134,65539 1372,56701 2017 752 SWE Sweden Iron and Steel 398 KAZ Kazakhstan 2253084,06 1994430,01 1,6681E+11 1,4766E+11 3774,624 0 1 1986,055 1758,05589 1758055886 0 49,6 60 43721,5502 52888,972 2017 752 SWE Sweden Iron and Steel 428 LVA Latvia 42814808,6 37899668,6 3,0484E+10 2,6984E+10 591,2189 1 0 486,72 430,844544 430844544 0 49,6 60 0 0 2017 752 SWE Sweden Iron and Steel 440 LTU Lithuania 121407889 107470263 4,7759E+10 4,2276E+10 676,5552 1 0 325,181 287,850221 287850221 0 49,6 60 0 0 2017 752 SWE Sweden Iron and Steel 442 LUX Luxembourg 202057048 178860899 6,5712E+10 5,8168E+10 1207,732 1 0 479,01 424,019652 424019652 0 49,6 60 0 0 2017 752 SWE Sweden Iron and Steel 458 MYS Malaysia 26276995,8 23260396,6 3,1911E+11 2,8248E+11 9568,984 0 1 1133,718 1003,56717 1003567174 0 49,6 60 2139,98637 2588,69319 2017 752 SWE Sweden Iron and Steel 470 MLT Malta 237555,34 210283,987 1,3485E+10 1,1937E+10 2558,882 1 0 512,357 453,538416 453538416 0 49,6 60 0 0 2017 752 SWE Sweden Iron and Steel 484 MEX Mexico 1732970,3 1534025,31 1,1907E+12 1,054E+12 9357,389 1 0 763,524 675,871445 675871445 0 49,6 60 21853,1099 26435,2135 2017 752 SWE Sweden Iron and Steel 504 MAR Morocco 63285,587 56020,4016 1,1854E+11 1,0493E+11 3274,223 1 0 651,278 576,511286 576511286 0 49,6 60 510438,321 617465,711 2017 752 SWE Sweden Iron and Steel 104 MMR Myanmar 351,587 311,224812 6,6055E+10 5,8472E+10 7752,467 0 1 0 0 0 0 49,6 60 0 0 2017 752 SWE Sweden Iron and Steel 528 NLD Netherlands 547373442 484534971 8,3387E+11 7,3814E+11 1009,396 1 0 729,565 645,810938 645810938 0 49,6 60 0 0 2017 752 SWE Sweden Iron and Steel 554 NZL New Zealand 203334,244 179991,473 2,0656E+11 1,8284E+11 17389,62 0 1 499,123 441,82368 441823680 13,457211 49,6 60 88719,4254 114248,225 2017 752 SWE Sweden Iron and Steel 579 NOR Norway 389009818 344351491 4,0175E+11 3,5562E+11 502,6935 1 0 531,742 470,698018 470698018 0 49,6 60 0 0 2017 752 SWE Sweden Iron and Steel 604 PER Peru 21563,978 19088,4333 2,1101E+11 1,8678E+11 11219,56 1 0 266,157 235,602176 235602176 0 49,6 60 612196,284 740560,021 2017 752 SWE Sweden Iron and Steel 608 PHL Philippines 279745,73 247630,92 3,2848E+11 2,9077E+11 9639,514 0 1 614,462 543,921762 543921762 0 49,6 60 108946,489 131790,108 2017 752 SWE Sweden Iron and Steel 616 POL Poland 275472312 243848091 5,2464E+11 4,6441E+11 848,3859 1 0 767,366 679,272383 679272383 0 49,6 60 0 0 2017 752 SWE Sweden Iron and Steel 620 PRT Portugal 7306555,32 6467762,77 2,2136E+11 1,9595E+11 2821,618 1 0 384,091 339,997353 339997353 0 49,6 60 0 0 2017 752 SWE Sweden Iron and Steel 642 ROU Romania 25174654,6 22284604,3 2,1015E+11 1,8602E+11 1640,88 1 0 921,399 815,622395 815622395 0 49,6 60 0 0 2017 752 SWE Sweden Iron and Steel 643 RUS Russian Federation 62819148 55607509,8 1,5742E+12 1,3935E+12 2081,843 0 1 3053,847 2703,26536 2703265364 0 49,6 60 2411,2204 2916,79887 2017 752 SWE Sweden Iron and Steel 682 SAU Saudi Arabia 18985,676 16806,1204 7,1499E+11 6,3291E+11 4479,738 0 1 854,906 756,762791 756762791 0 49,6 60 2233438,39 2701739,99 2017 752 SWE Sweden Iron and Steel 702 SGP Singapore 737394,275 652741,412 3,4327E+11 3,0387E+11 9782,643 0 1 642,658 568,880862 568880862 0 49,6 60 43227,6706 52291,537 2017 752 SWE Sweden Iron and Steel 703 SVK Slovakia 44597469,8 39477680,3 9,565E+10 8,4669E+10 1176,298 1 0 1190,858 1054,1475 1054147502 0 49,6 60 0 0 2017 752 SWE Sweden Iron and Steel 705 SVN Slovenia 7787291,38 6893310,33 4,8589E+10 4,3011E+10 1420,52 1 0 398,906 353,111591 353111591 0 49,6 60 0 0 2017 752 SWE Sweden Iron and Steel 710 ZAF South Africa 54619328,3 48349029,4 3,8145E+11 3,3766E+11 9838,573 1 0 7739,19 6850,73099 6850730988 0 49,6 60 7027,98507 8501,59484 2017 752 SWE Sweden Iron and Steel 410 KOR South Korea 104233236 92267260,2 1,6231E+12 1,4367E+12 7682,775 1 0 1405,425 1244,08221 1244082210 18,1388805 49,6 60 424,204848 564,432866 2017 752 SWE Sweden Iron and Steel 724 ESP Spain 157301364 139243167 1,3132E+12 1,1625E+12 2486,548 1 0 543,175 480,81851 480818510 0 49,6 60 0 0 2017 752 SWE Sweden Iron and Steel 757 CHE Switzerland 28533830,1 25258146,4 6,952E+11 6,1539E+11 1422,902 1 0 263,958 233,655622 233655622 0 49,6 60 458,83489 555,042206 2017 752 SWE Sweden Iron and Steel 764 THA Thailand 6331957,29 5605048,59 4,5636E+11 4,0397E+11 8415,42 0 1 1032,04 913,561808 913561808 0 49,6 60 8084,2592 9779,34581 2017 752 SWE Sweden Iron and Steel 788 TUN Tunisia 0 0 4,2164E+10 3,7323E+10 2582,251 1 0 0 0 0 0 49,6 60 0 0 2017 752 SWE Sweden Iron and Steel 792 TUR Türkiye 65640396 58104878,5 8,5899E+11 7,6038E+11 2453,421 1 0 895,526 792,719615 792719615 0 49,6 60 676,688325 818,574586 2017 752 SWE Sweden Iron and Steel 826 GBR United Kingdom 523648848 463533960 2,6801E+12 2,3725E+12 1292,802 1 0 588,791 521,197793 521197793 0 49,6 60 0 0 2017 752 SWE Sweden Iron and Steel 842 USA USA 80454965,7 71218735,7 1,9477E+13 1,7241E+13 7440,511 0 1 563,233 498,573852 498573852 0 49,6 60 347,22974 420,035975 2017 752 SWE Sweden Iron and Steel 704 VNM Viet Nam 13583196,3 12023845,4 2,8135E+11 2,4905E+11 8727,681 0 1 1313,777 1162,9554 1162955400 0 49,6 60 4797,34944 5803,24529
Comment