Announcement

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

  • Gravity model of trade using reghdfe and ppmlhdfe

    Hello Joao Santos Silva and others!

    I am currently completing a project which requires the use of a gravity model. I have a dataset for 2 years with the bilateral trade patterns of 134 countries. I want to run a regression using both time and country pair fixed effects. I was just wondering what the theoretical differences were between using the reghdfe and ppml so that I can understand which would be best for my project, or alternatively whether I should just use both. A simple explanation would be great or alternatively you could point me in the direction of a paper/website that would tell me more?

    Best Regards,

    Arthur.

  • #2
    Dear arthur hughes,

    With reghdfe you estimate a linear regression (presumably of the log of the variable of interest) on your regressors. With ppmlhdfe you estimate an exponential model of the dependent variable on the regressors. The advantages of this approach are that, because you do not have to take logs of the dependent variable, you can use observations in which the dependent variable is zero, and you do not introduce "Jensen's inequality bias" (this comes from the fact that the expected value of log of y is not the log of the expected value of y). For further details, see here.

    Best wishes,

    Joao

    Comment


    • #3
      thank you for the reply Joao Santos Silva !
      So in my case the dependant variable that I am looking at is the log of imports and I dont have any blanks. Does this negate the benefits of using ppmlhdfe, meaning I should stick to reghdfe? Or are there other benefits of using an exponential model as well?

      Comment


      • #4
        You still have the main benefit, which is avoiding the Jensen's inequality bias and that is more than enough to make PPML preferable.

        Comment


        • #5
          Ok, thank you, and just to clarify one more thing if I were to use ppml would I use just imports as my dependent variable instead of ln(imports) because in the papers this is done, or is the ability to not use logs an added benefit rather than a necessity? thank you ! Joao Santos Silva

          Comment


          • #6
            It's both! Do not use logs...

            Comment


            • #7
              thank you for all the help! I have a couple more questions, really sorry for bothering you! Joao Santos Silva

              1. I am struggling to understand jensens inequality bias and how my results are becoming more accurate with ppml as a result of avoiding this, would you mind explaining it for me in simple terms.
              2. What is the benefit of being able to use imports instead of the log of imports?
              3. lots of my variables are constant for country pairs, for example distance, common language, common colonisor etc. When I use fixed effects for country pairs I obviously lose these, do you think it would be ok to also try a regression where I replace fixed effects for country pairs with fixed effects for both importer and exporter, when I do this these variables are then not omitted.

              Again, thanks a lot for all your help so far.

              Comment


              • #8
                Dear arthur hughes,

                1. I suggest you read this paper. In short, in general a model for ln(y) is not informative about the behaviour of y.
                2. Besides avoiding the problem noted in 1 above, it allows you to use the observations where trade is zero.
                3. That depends on the purpose of your work. If you are studying the effect of some policy like a free trade agreement, you need to include the pair fixed effects. Otherwise you do not.

                Best wishes,

                Joao

                Comment


                • #9
                  Hi Joao Santos Silva, thank you for your reply.
                  I am studying the effect that democracy has on trade using the polity 5 index of democracy with scores for both importers and exporters, do you think id be ok using fixed effects for individual exporters and importers for this study?

                  Comment


                  • #10
                    Generally, the model include imp-time and exp-time fixed effects, in which case you cannot identify the effect of your variables of interest. So, you have to think about your particular problem and decide what to do.

                    Comment


                    • #11
                      Ok, thank you so much Joao Santos Silva, that is something I will have to consider. I have another question with regards to the interpretation of my coefficients in ppml, now that I am not using the log of imports.
                      I am using the code ppmlhdfe imports lgdpim lgdpex lpolity5rep lpolity5part, a(countrypairs period) cluster(countrypairs)
                      and this gives me results where my coefficient on lpolity5rep (which is the log of my democracy index) is 0.4318 and statistically significant.

                      would you mind helping me interpret the coefficient on lpolity5rep in terms of how the democracy rating is effecting imports? sorry for what is probably an obvious question but I struggle with the intuition for interpreting the coefficients in Linear_Log regressions! Just want to make sure I interpret it correctly.

                      Comment


                      • #12
                        Because it is an exponential model, the interpretation is as in a log-log mode.

                        Comment


                        • #13
                          Ah yes, so thats where I was going wrong. So would I be correct in saying that a 1% increase in the reporters democracy score results in a 0.4318% increase in imports? on the basis of those regression results.

                          Comment


                          • #14
                            Hi @Jao Santos Silva @ Please tell me something about the interpretation of wald chi2 test results in ppmlhdfe. 1)At what level of p-value it becomes significant? 2)Does an insignificant chi-2 value imply insignificance of the model as well. (if yes) With the same set of regressors including three-way fixed effects, is it possible to get a results which shows model is significant when it is estimated with reghdfe and insignificant when it is estimated with ppmlhdfe?

                            Comment


                            • #15
                              Dear sabeer vc,

                              I would simply ignore that test and would not even consider estimating using reghdfe.

                              Best wishes,

                              Joao

                              Comment

                              Working...
                              X