Announcement

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

  • Gravity model

    Hi there

    Have run a ppml specification of the gravity model without time and country fixed effects, with time-fixed effects, with country-fixed effects and with time and country fixed effects.

    I used panel data on agricultural exports to countries that are members of the SADC FTA and used the following variables: gdp importer, gdp exporter, pop importer, pop exporter, dist and dummy variables of comlang comborder and a SADC FTA variable that gave a score of 1 if both were members and zero if not.

    The coefficients for some of the variables are strongly negative which implies a 100% reduction in exports

    For example in my country-fixed effects specification comlang has a coefficient of -15.91 which implied a -100% decrease in exports ((e^-15.91)-1) to the SADC country if they share a common official language.

    Does that result make sense?

  • #2
    Dear Nate Seeber,

    I suspect you are looking at the coefficients of variables that are perfectly collinear with fixed effects. Please estimate the model using ppmlhdfe.

    Best wishes,

    Joao

    Comment


    • #3
      Hi Joao

      Thanks for coming back to me!

      To be sure is it correct to create the fixed effects through dummy variables for each year and country?

      I have used this link https://github.com/sergiocorreia/ppmlhdfe to install ppmlhdfe, ftools and reghdfe from Github

      I ran the regressions with the fixed effects using ppmlhdfe instead of the ppml command but the coefficients still came back with high negative values (albeit less than before).

      Any idea what else I could be doing wrong?

      Breakdown of regression below including the time (18 total) and country dummy variables (91):

      PPML regression No. of obs = 3,840
      Residual df = 3,722
      Wald chi2(117) = 17634.35
      Deviance = 9014374.651 Prob > chi2 = 0.0000
      Log pseudolikelihood = -4512475.42 Pseudo R2 = 0.9074

      Robust
      Exports Coef. Std. Err. z P>z [95% Conf. Interval]

      GDPAmln .9471396 .2100388 4.51 0.000 .5354712 1.358808
      GDPBmln -1.362104 .2276871 -5.98 0.000 -1.808363 -.9158461
      PopAk -6.206338 1.524381 -4.07 0.000 -9.19407 -3.218606
      PopBk -.2304087 1.487446 -0.15 0.877 -3.145749 2.684931
      DistAB -4.967141 .3888447 -12.77 0.000 -5.729262 -4.205019
      ComBorder -.9975934 .2547292 -3.92 0.000 -1.496853 -.4983334
      ComLang -8.646771 2.091908 -4.13 0.000 -12.74684 -4.546707
      SADC .6287628 .2585575 2.43 0.015 .1219994 1.135526

      Comment


      • #4
        Dear Nate Seeber,

        Are some parameters exactly the same as when you estimate by ppml? The identified parameters should have exactly the same value; if that is not the case you are not implementing the estimators correctly. Notice that in ppmlhdfe the fixed effects are not defined by dummies but by variables that identify the different groups. For example, you should not include a dummy for each year, but simply a variable that takes the values of the different years.

        Best wishes,

        Joao

        Comment


        • #5
          Hi Joao

          All the other variables have exactly the same coefficients under ppml and ppmldfe except for Comlang.

          Is there a simple code I can use to create a value for each year?

          I am currently putting my code in like this:

          ppmlhdfe Exports GDPAmln GDPBmln PopAk PopBk DistAB ComBorder ComLang SADC YearDummy1 YearDummy2 YearDummy3 YearDummy4 YearDummy5 YearDummy6 YearDummy7 YearDummy8 YearDummy9 YearDummy10 YearDummy11 YearDummy12 YearDummy13 YearDummy14 YearDummy15 YearDummy16 YearDummy17 YearDummy18 YearDummy19 ImporterDummy1 ImporterDummy2 ImporterDummy3 ImporterDummy4 ExporterDummy1 ExporterDummy2 ExporterDummy3 ExporterDummy4 ExporterDummy5 ExporterDummy6 ExporterDummy7 ExporterDummy8 ExporterDummy9 ExporterDummy10 ExporterDummy11 ExporterDummy12 ExporterDummy13 ExporterDummy14 ExporterDummy15 ExporterDummy16 ExporterDummy17 ExporterDummy18 ExporterDummy19 ExporterDummy20 ExporterDummy21 ExporterDummy22 ExporterDummy23 ExporterDummy24 ExporterDummy25 ExporterDummy26 ExporterDummy27 ExporterDummy28 ExporterDummy29 ExporterDummy30 ExporterDummy31 ExporterDummy32 ExporterDummy33 ExporterDummy34 ExporterDummy35 ExporterDummy36 ExporterDummy37 ExporterDummy38 ExporterDummy39 ExporterDummy40 ExporterDummy41 ExporterDummy42 ExporterDummy43 ExporterDummy44 ExporterDummy45 ExporterDummy46 ExporterDummy47 ExporterDummy48 ExporterDummy49 ExporterDummy50 ExporterDummy51 ExporterDummy52 ExporterDummy53 ExporterDummy54 ExporterDummy55 ExporterDummy56 ExporterDummy57 ExporterDummy58 ExporterDummy59 ExporterDummy60 ExporterDummy61 ExporterDummy62 ExporterDummy63 ExporterDummy64 ExporterDummy65 ExporterDummy66 ExporterDummy67 ExporterDummy68 ExporterDummy69 ExporterDummy70 ExporterDummy71 ExporterDummy72 ExporterDummy73 ExporterDummy74 ExporterDummy75 ExporterDummy76 ExporterDummy77 ExporterDummy78 ExporterDummy79 ExporterDummy80 ExporterDummy81 ExporterDummy82 ExporterDummy83 ExporterDummy84 ExporterDummy85 ExporterDummy86 ExporterDummy87 ExporterDummy88 ExporterDummy89 ExporterDummy90

          Comment


          • #6
            Dear Nate Seeber,

            Please use the absorb option. Check the help file for examples.

            Best wishes,

            Joao

            Comment


            • #7
              Hi Joao,

              Thanks for the help.

              I have revised the code to ppmlhdfe Exports GDPAmln GDPBmln PopAk PopBk DistAB ComBorder ComLang Col SADC, a( Importer Exporter Year)

              Regression update below (ComLang + Col have been omitted due to collinearity):

              HDFE PPML regression No. of obs = 3,840
              Absorbing 3 HDFE groups Residual df = 3,722
              Wald chi2(7) = 289.38
              Deviance = 9014374.651 Prob > chi2 = 0.0000
              Log pseudolikelihood = -4512475.42 Pseudo R2 = 0.9074
              ------------------------------------------------------------------------------
              | Robust
              Exports | Coef. Std. Err. z P>|z| [95% Conf. Interval]
              -------------+----------------------------------------------------------------
              GDPAmln | .9471396 .2100388 4.51 0.000 .5354712 1.358808
              GDPBmln | -1.362104 .2276871 -5.98 0.000 -1.808363 -.9158461
              PopAk | -6.206338 1.524381 -4.07 0.000 -9.19407 -3.218606
              PopBk | -.2304087 1.487446 -0.15 0.877 -3.145749 2.684931
              DistAB | -4.967141 .3888447 -12.77 0.000 -5.729262 -4.205019
              ComBorder | -.9975934 .2547292 -3.92 0.000 -1.496853 -.4983334
              ComLang | 0 (omitted)
              Col | 0 (omitted)
              SADC | .6287628 .2585575 2.43 0.015 .1219994 1.135526
              _cons | 130.401 22.7137 5.74 0.000 85.88295 174.919
              ------------------------------------------------------------------------------

              Absorbed degrees of freedom:
              -----------------------------------------------------+
              Absorbed FE | Categories - Redundant = Num. Coefs |
              -------------+---------------------------------------|
              Importer | 4 0 4 |
              Exporter | 90 1 89 |
              Year | 19 1 18 ?|
              -----------------------------------------------------+

              On terms of interpreting the coefficients would it be fair to say that a 1% increase in PopA would reduce exports by -1% = +1% *(exp(-6.21)-1) ?

              Thanks again for your help.

              Comment


              • #8
                Your continuous regressors should be in logs (are they?) and then the coefficients are elasticities.

                Best wishes,

                Joao

                Comment


                • #9
                  Hi Joao,

                  Yes I took the natural log in excel but did not change variable names.

                  Thanks again for all the help.

                  Comment

                  Working...
                  X