Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • PPML with country fixed effect and year fixed effect

    Hello! I'm a Master's Candidate in Economics major, University of Indonesia

    I'm doing a research on the impact of Indonesian Nickel Ore Export Ban towards the export value of its Indonesian derivative products to the destination countries
    My theses's reviewer ask me to include country fixed effect and time fixed effect
    Time fixed effect result doesn't have any problem but I got a problem with regressing the country fixed effect

    I tried to use this following command:
    Code:
    ppmlhdfe EXPjtUSD EXBanIDNt ln_GDPIDNtUSD ln_GDPjtUSD ExchRateIDRjt ln_Distancej ln_NickelPricet Pandemic i.country
    EXBanIDNt and Pandemic are both dummy variables

    and this is the result I got
    ppmlhdfe EXPjtUSD EXBanIDNt ln_GDPIDNtUSD ln_GDPjtUSD ExchRateIDRjt ln_Distancej ln_NickelPricet Pandemic
    > i.country
    warning: dependent variable takes very low values after standardizing (3.5570e-09)
    Iteration 1: deviance = 2.6838e+11 eps = . iters = 1 tol = 1.0e-04 min(eta) = -5.78 P
    Iteration 2: deviance = 1.6289e+11 eps = 6.48e-01 iters = 1 tol = 1.0e-04 min(eta) = -10.42
    Iteration 3: deviance = 1.3927e+11 eps = 1.70e-01 iters = 1 tol = 1.0e-04 min(eta) = -21.56
    Iteration 4: deviance = 1.3485e+11 eps = 3.28e-02 iters = 1 tol = 1.0e-04 min(eta) = -32.11
    Iteration 5: deviance = 1.3423e+11 eps = 4.62e-03 iters = 1 tol = 1.0e-04 min(eta) = -37.19
    Iteration 6: deviance = 1.3413e+11 eps = 7.48e-04 iters = 1 tol = 1.0e-04 min(eta) = -38.71
    Iteration 7: deviance = 1.3410e+11 eps = 2.05e-04 iters = 1 tol = 1.0e-04 min(eta) = -39.70
    Iteration 8: deviance = 1.3410e+11 eps = 5.89e-05 iters = 1 tol = 1.0e-04 min(eta) = -40.65
    Iteration 9: deviance = 1.3409e+11 eps = 1.67e-05 iters = 1 tol = 1.0e-05 min(eta) = -41.51
    Iteration 10: deviance = 1.3409e+11 eps = 4.37e-06 iters = 1 tol = 1.0e-05 min(eta) = -42.19 S
    Iteration 11: deviance = 1.3409e+11 eps = 9.08e-07 iters = 1 tol = 1.0e-06 min(eta) = -42.56 S
    Iteration 12: deviance = 1.3409e+11 eps = 1.71e-07 iters = 1 tol = 1.0e-07 min(eta) = -42.65 S
    Iteration 13: deviance = 1.3409e+11 eps = 4.09e-08 iters = 1 tol = 1.0e-07 min(eta) = -42.66 S
    Iteration 14: deviance = 1.3409e+11 eps = 8.69e-09 iters = 1 tol = 1.0e-09 min(eta) = -42.66 S O

    (legend: p: exact partial-out s: exact solver h: step-halving o: epsilon below tolerance)
    Converged in 14 iterations and 14 HDFE sub-iterations (tol = 1.0e-08)
    warning: variance matrix is nonsymmetric or highly singular.

    PPML regression No. of obs = 2,080
    Residual df = 1,989
    Wald chi2(90) = 16738.13
    Deviance = 1.34094e+11 Prob > chi2 = 0.0000
    Log pseudolikelihood = -6.70470e+10 Pseudo R2 = 0.6446

    Robust
    EXPjtUSD Coefficient std. err. z P>z [95% conf. interval]

    EXBanIDNt -.2610554 . . . . .
    ln_GDPIDNtUSD -.5106122 . . . . .
    ln_GDPjtUSD 7.870495 . . . . .
    ExchRateIDRjt -.0002984 . . . . .
    ln_Distancej 5.267245 . . . . .
    ln_NickelPricet .3215061 . . . . .
    Pandemic .5252581 . . . . .

    country
    Aljazair -.1115996 . . . . .
    Amerika Serikat -29.89006 . . . . .
    Angola 2.995534 . . . . .
    Australia -8.749 . . . . .
    Austria -5.866425 . . . . .
    Bangladesh 6.584127 . . . . .
    Belanda -1.994256 . . . . .
    Belarus 17.25977 . . . . .
    Belgia .4469065 . . . . .
    Brazil -14.00681 . . . . .
    Brunei 29.71463 . . . . .
    Brunei 30.23168 . . . . .
    Bulgaria 14.97437 . . . . .
    Burma 13.98672 . . . . .
    Chili -5.974868 . . . . .
    China -19.6525 . . . . .
    Denmark -9.257653 . . . . .
    Ekuador 8.721974 . . . . .
    Estonia 20.91524 . . . . .
    Fiji 28.2642 . . . . .
    Finlandia -2.229176 . . . . .
    Ghana 3.015398 . . . . .
    Guinea 19.20981 . . . . .
    Hungaria -3.5081 . . . . .
    India -8.867043 . . . . .
    Inggris -14.51688 . . . . .
    Irak -.0102482 . . . . .
    Iran -5.160684 . . . . .
    Israel -.9351605 . . . . .
    Italia -7.245999 . . . . .
    Jepang -13.23711 . . . . .
    Jerman -17.22056 . . . . .
    Kamboja -4.73666 . . . . .
    Kanada -15.18242 . . . . .
    Kazakhstan -4.834557 . . . . .
    Kenya 10.52815 . . . . .
    Kep. Salomon 37.81915 . . . . .
    Kolumbia -4.909772 . . . . .
    Korea Selatan -5.509322 . . . . .
    Kuwait 17.84832 . . . . .
    Laos 19.36132 . . . . .
    Latvia 17.71634 . . . . .
    Lebanon 12.09906 . . . . .
    Lithuania 17.18603 . . . . .
    Malaysia 14.84972 . . . . .
    Malta 23.87813 . . . . .
    Maroko 2.483316 . . . . .
    Meksiko -14.13872 . . . . .
    Mesir -2.121025 . . . . .
    Nigeria -7.892472 . . . . .
    Norwegia -5.088919 . . . . .
    Oman 14.31529 . . . . .
    Pakistan 1.157468 . . . . .
    Panama 13.59495 . . . . .
    Papua Nugini 19.61104 . . . . .
    Paraguay 10.76716 . . . . .
    Perancis -16.15502 . . . . .
    Peru .404898 . . . . .
    Pilipina 3.899565 . . . . .
    Polandia -3.105256 . . . . .
    Portugal 2.994682 . . . . .
    Prancis -19.58036 . . . . .
    Qatar 3.246556 . . . . .
    Romania -.1952607 . . . . .
    Rusia -10.69308 . . . . .
    Saudi Arabia -5.312447 . . . . .
    Selandia Baru 3.406831 . . . . .
    Singapura 15.33509 . . . . .
    Slovenia 15.47403 . . . . .
    Spanyol -7.274483 . . . . .
    Sri Langka 13.76771 . . . . .
    Sudan 2.958472 . . . . .
    Swedia -8.595944 . . . . .
    Swiss -7.290057 . . . . .
    Taiwan 4.30245 . . . . .
    Thailand 7.414813 . . . . .
    Togo 18.82108 . . . . .
    Tunisia 13.1104 . . . . .
    Turki -4.954901 . . . . .
    Ukraina 7.698375 . . . . .
    Uni Emirate Arab .4707735 . . . . .
    Vietnam 10.43486 . . . . .
    Yunani 6.312664 . . . . .

    _cons -232.1298 . . . . .

    I don't know why the results of the probability and other terms not showing any number, only "."
    Some explanations would help me a lot

    Best Regards
    Tasyadhila

  • #2
    [UPDATE]

    I drop the Distance variable and the result got better, the probability and other terms are showing number

    Code:
    . ppmlhdfe EXPjtUS EXBanINDt GDPINDtUS GDPjtUS ExchjtjIDR NickelGlobalPricemt Pandemic i.negara
    warning: dependent variable takes very low values after standardizing (3.5570e-09)
    Iteration 1:   deviance = 2.5054e+11  eps = .         iters = 1    tol = 1.0e-04  min(eta) =  -4.76  P   
    Iteration 2:   deviance = 1.5743e+11  eps = 5.91e-01  iters = 1    tol = 1.0e-04  min(eta) =  -6.41      
    Iteration 3:   deviance = 1.4137e+11  eps = 1.14e-01  iters = 1    tol = 1.0e-04  min(eta) =  -8.58      
    Iteration 4:   deviance = 1.3974e+11  eps = 1.16e-02  iters = 1    tol = 1.0e-04  min(eta) = -10.77      
    Iteration 5:   deviance = 1.3949e+11  eps = 1.82e-03  iters = 1    tol = 1.0e-04  min(eta) = -12.27      
    Iteration 6:   deviance = 1.3942e+11  eps = 4.91e-04  iters = 1    tol = 1.0e-04  min(eta) = -13.26      
    Iteration 7:   deviance = 1.3940e+11  eps = 1.34e-04  iters = 1    tol = 1.0e-04  min(eta) = -14.06      
    Iteration 8:   deviance = 1.3940e+11  eps = 3.60e-05  iters = 1    tol = 1.0e-04  min(eta) = -14.62      
    Iteration 9:   deviance = 1.3939e+11  eps = 9.27e-06  iters = 1    tol = 1.0e-05  min(eta) = -14.84      
    Iteration 10:  deviance = 1.3939e+11  eps = 2.33e-06  iters = 1    tol = 1.0e-06  min(eta) = -14.87   S  
    Iteration 11:  deviance = 1.3939e+11  eps = 5.43e-07  iters = 1    tol = 1.0e-06  min(eta) = -15.72   S  
    Iteration 12:  deviance = 1.3939e+11  eps = 1.26e-07  iters = 1    tol = 1.0e-07  min(eta) = -16.63   S  
    Iteration 13:  deviance = 1.3939e+11  eps = 3.09e-08  iters = 1    tol = 1.0e-07  min(eta) = -17.42   S  
    Iteration 14:  deviance = 1.3939e+11  eps = 6.16e-09  iters = 1    tol = 1.0e-09  min(eta) = -17.96   S O
    ------------------------------------------------------------------------------------------------------------
    (legend: p: exact partial-out   s: exact solver   h: step-halving   o: epsilon below tolerance)
    Converged in 14 iterations and 14 HDFE sub-iterations (tol = 1.0e-08)
    
    PPML regression                                   No. of obs      =      2,080
                                                      Residual df     =      1,990
                                                      Wald chi2(89)   =   11325.56
    Deviance             =  1.39393e+11               Prob > chi2     =     0.0000
    Log pseudolikelihood = -6.96967e+10               Pseudo R2       =     0.6305
    -------------------------------------------------------------------------------------
                        |               Robust
                EXPjtUS | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
    --------------------+----------------------------------------------------------------
              EXBanINDt |  -.3153367    .431953    -0.73   0.465    -1.161949    .5312758
              GDPINDtUS |   3.24e-12   2.26e-12     1.43   0.152    -1.19e-12    7.67e-12
                GDPjtUS |   4.12e-13   1.45e-13     2.83   0.005     1.27e-13    6.97e-13
             ExchjtjIDR |  -9.549194   8.119171    -1.18   0.240    -25.46248    6.364088
    NickelGlobalPricemt |   .0000343   .0000714     0.48   0.631    -.0001057    .0001743
               Pandemic |   .6521554    .698013     0.93   0.350    -.7159249    2.020236
                        |
                 negara |
              Aljazair  |  -3.752628   1.101659    -3.41   0.001     -5.91184   -1.593417
       Amerika Serikat  |  -5.760756   2.904674    -1.98   0.047    -11.45381   -.0676992
                Angola  |  -6.830673   1.263774    -5.40   0.000    -9.307625    -4.35372
             Australia  |  -2.689184   .9011427    -2.98   0.003    -4.455391    -.922977
               Austria  |  -7.265089    1.28812    -5.64   0.000    -9.789757    -4.74042
            Bangladesh  |  -.1331601    1.01311    -0.13   0.895     -2.11882      1.8525
               Belanda  |   2.461212   .9550627     2.58   0.010     .5893239    4.333101
               Belarus  |  -2.437102   .9976954    -2.44   0.015    -4.392549   -.4816554
                Belgia  |   .9052063   .8971202     1.01   0.313    -.8531169    2.663529
                Brazil  |   .8768563   .9067285     0.97   0.334    -.9002989    2.654012
                Brunei  |  -6.728021   1.081417    -6.22   0.000     -8.84756   -4.608482
               Brunei   |   -6.21098   .9827001    -6.32   0.000    -8.137036   -4.284923
              Bulgaria  |  -.2973734    .903022    -0.33   0.742    -2.067264    1.472517
                 Burma  |  -2.745393   1.130551    -2.43   0.015    -4.961232   -.5295531
                 Chili  |  -4.459043   1.363087    -3.27   0.001    -7.130645   -1.787442
                 China  |   .7129879   2.064497     0.35   0.730    -3.333351    4.759327
               Denmark  |  -8.842983   1.049389    -8.43   0.000    -10.89975   -6.786218
               Ekuador  |   .0458829   .9345264     0.05   0.961    -1.785755    1.877521
               Estonia  |   -2.18543    1.02564    -2.13   0.033    -4.195647   -.1752133
                  Fiji  |  -7.245235   .9123981    -7.94   0.000    -9.033503   -5.456968
             Finlandia  |  -7.337256   1.244349    -5.90   0.000    -9.776135   -4.898377
                 Ghana  |    -10.499   .8161903   -12.86   0.000     -12.0987   -8.899297
                Guinea  |  -1.108634   3.168876    -0.35   0.726    -7.319518    5.102249
              Hungaria  |   -9.25845   1.096743    -8.44   0.000    -11.40803   -7.108873
                 India  |    3.11711   .9095957     3.43   0.001     1.334336    4.899885
               Inggris  |  -1.210647   .9193697    -1.32   0.188    -3.012578    .5912845
                  Irak  |   -4.18043   1.559374    -2.68   0.007    -7.236747   -1.124114
                  Iran  |   1.730735    4.11815     0.42   0.674    -6.340691    9.802161
                Israel  |  -1.591067   1.001344    -1.59   0.112    -3.553665    .3715312
                Italia  |    3.28174   .9214949     3.56   0.000     1.475643    5.087837
                Jepang  |   3.478185   1.009112     3.45   0.001     1.500361    5.456009
                Jerman  |  -2.550915   1.081797    -2.36   0.018    -4.671198   -.4306325
               Kamboja  |   -1.96226     2.9188    -0.67   0.501    -7.683002    3.758482
                Kanada  |  -3.020721   .9171142    -3.29   0.001    -4.818232   -1.223211
            Kazakhstan  |  -9.672477   .9740554    -9.93   0.000    -11.58159   -7.763364
                 Kenya  |  -1.149019   .9465047    -1.21   0.225    -3.004134     .706096
          Kep. Salomon  |  -7.616336   .9643931    -7.90   0.000    -9.506512    -5.72616
              Kolumbia  |   1.053889   2.089651     0.50   0.614    -3.041751     5.14953
         Korea Selatan  |   4.761598   1.293996     3.68   0.000     2.225412    7.297784
                Kuwait  |  -2.418159   1.158172    -2.09   0.037    -4.688134   -.1481846
                  Laos  |   -3.44444   5.615441    -0.61   0.540     -14.4505    7.561622
                Latvia  |  -4.226868   1.226672    -3.45   0.001    -6.631101   -1.822635
               Lebanon  |  -2.197293   1.339779    -1.64   0.101    -4.823211    .4286256
             Lithuania  |  -1.346107   1.040571    -1.29   0.196    -3.385588     .693374
              Malaysia  |   3.506235   .9229968     3.80   0.000     1.697195    5.315276
                 Malta  |  -4.054716   1.286714    -3.15   0.002    -6.576628   -1.532803
                Maroko  |  -4.121303    1.04771    -3.93   0.000    -6.174777   -2.067829
               Meksiko  |  -1.125311   .8810176    -1.28   0.202    -2.852074    .6014516
                 Mesir  |  -1.404797   1.133535    -1.24   0.215    -3.626485    .8168914
               Nigeria  |  -3.415905   .9918975    -3.44   0.001    -5.359989   -1.471822
              Norwegia  |   -2.82404   .9600037    -2.94   0.003    -4.705613   -.9424674
                  Oman  |  -6.635723   1.213792    -5.47   0.000    -9.014712   -4.256735
              Pakistan  |  -1.664226   1.039165    -1.60   0.109    -3.700952    .3725004
                Panama  |   .6137207   1.288823     0.48   0.634    -1.912327    3.139768
          Papua Nugini  |  -6.106651   1.188099    -5.14   0.000    -8.435282   -3.778019
              Paraguay  |   1.615679   3.726352     0.43   0.665    -5.687837    8.919194
              Perancis  |  -3.192297   1.020624    -3.13   0.002    -5.192683   -1.191911
                  Peru  |  -.7199769   1.022675    -0.70   0.481    -2.724384     1.28443
              Pilipina  |  -1.641575   .9724335    -1.69   0.091     -3.54751    .2643593
              Polandia  |   .6162372   .8732663     0.71   0.480    -1.095333    2.327808
              Portugal  |  -2.203713   1.060699    -2.08   0.038    -4.282646   -.1247808
               Prancis  |  -6.617601     1.3065    -5.07   0.000    -9.178293   -4.056909
                 Qatar  |  -4.444163   .9704603    -4.58   0.000     -6.34623   -2.542096
               Romania  |  -4.278705   1.288951    -3.32   0.001    -6.805003   -1.752408
                 Rusia  |   .6429546   .8768307     0.73   0.463    -1.075602    2.361511
          Saudi Arabia  |   -1.55668   1.189414    -1.31   0.191    -3.887889    .7745289
         Selandia Baru  |  -3.571227   .8994885    -3.97   0.000    -5.334192   -1.808262
             Singapura  |   .9782505   .8725409     1.12   0.262    -.7318982    2.688399
              Slovenia  |  -2.208369   1.020155    -2.16   0.030    -4.207836   -.2089019
               Spanyol  |   .8821859   .8738823     1.01   0.313    -.8305919    2.594964
            Sri Langka  |  -1.257297    .848263    -1.48   0.138    -2.919862    .4052678
                 Sudan  |  -9.442556   1.085034    -8.70   0.000    -11.56918   -7.315929
                Swedia  |  -4.361981    .965856    -4.52   0.000    -6.255024   -2.468938
                 Swiss  |  -2.899139   1.290531    -2.25   0.025    -5.428533   -.3697448
                Taiwan  |   5.046001   .8777218     5.75   0.000     3.325697    6.766304
              Thailand  |   2.328834   .8814096     2.64   0.008      .601303    4.056365
                  Togo  |  -9.915135   .9209559   -10.77   0.000    -11.72018   -8.110095
               Tunisia  |  -2.656044   .9094262    -2.92   0.003    -4.438486   -.8736011
                 Turki  |   2.438084    .936579     2.60   0.009     .6024233    4.273745
               Ukraina  |  -1.157391   1.021496    -1.13   0.257    -3.159487    .8447042
      Uni Emirate Arab  |   -.732742   .8524323    -0.86   0.390    -2.403479    .9379947
               Vietnam  |    18.2835   12.22286     1.50   0.135    -5.672854    42.23986
                Yunani  |   -.394628   .9614312    -0.41   0.681    -2.278999    1.489743
                        |
                  _cons |    9.65055   2.752145     3.51   0.000     4.256446    15.04465
    -------------------------------------------------------------------------------------
    But if I may ask, is there any possible way to run the country fixed effect and still include the Distance variable?

    Best regards,
    Tasyadhila

    Comment


    • #3
      Dear Tasyadhila Larasati,

      You are not using the ppmlhdfe command correctly: the fixed effects should be "absorbed"; please check the help file. Anyway, if you only have one exporter in your data, the distance variable will be collinear with importer fixed effects and its effect cannot be identified; that is, the effects of distance are accounted for by the fixed effects.

      Best wishes,

      Joao

      Comment


      • #4
        Dear Professor Joao Santos Silva,

        I'm sorry for the late reply. Thank you so much for the suggestion and your explanation about the distance variable! I will definitely look up the help file that you've mentioned.

        Once again, thank you for kindly responding to my post.

        Best regards,
        Tasyadhila

        Comment


        • #5
          Dear Tasyadhila Larasati


          Can you give me some hint about how you estimated country-specific coefficients/log likelihood ratios?

          Example , for
          negara, Aljazair, Amerika Serikat , Angola , Australia , Austria etc.

          Last edited by Patrick Amoatey; 16 Oct 2023, 05:42.

          Comment


          • #6
            Dear Dr Joao Santos Silva


            Can you give me some hint about how Tasyadhila Larasati estimated country-specific coefficients/log likelihood ratios? which command i use in order to obtain country specific coefficients . Thanks .

            Example , for
            negara, Aljazair, Amerika Serikat , Angola , Australia , Austria etc.

            Comment

            Working...
            X