Announcement

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

  • Problem with generating country pair fixed effects in Gravity estimation

    Hello,

    I hope someone might help me with the following problem. I am trying to estimate a gravity equation on bilateral FDI flows and country pair fixed effects. Somehow when I estimate it the following way: "eststo: xtreg ln_FDI_position $varlist2, fe robust" R2 is wierdly low (0.05). I tried estimating the fe with generating dummies "qui tab year, g(dyear)" but that does not work (it says that countrypair has to many values). Does anybody has an idea on how to fix that?

    Thank you in advance!

  • #2
    Dear Imke Taylor,

    If you use commands like xtreg and reghdfe, you do not actually need to generate the dummies and the estimation is much faster. Also, I strongly advise you to estimate the model by Poisson regression (PPML); you can include multiple fixed effects if you used ppmlhdfe.

    Best wishes,

    Joao

    Comment


    • #3
      At https://stackoverflow.com/questions/...ity-estimation I advised you to post here but the code of practice explained in our FAQ Advice is that you tell us about cross-posting too.

      Comment


      • #4
        Originally posted by Joao Santos Silva View Post
        Dear Imke Taylor,

        If you use commands like xtreg and reghdfe, you do not actually need to generate the dummies and the estimation is much faster. Also, I strongly advise you to estimate the model by Poisson regression (PPML); you can include multiple fixed effects if you used ppmlhdfe.

        Best wishes,

        Joao
        Dear Joao, thank you very much for your answer. I think I should have rephrased my question a bit. Because my R2 was wierdly low whilst using "xtreg ln_FDI_position $varlist2, fe" I tried to generate dummies for the fixed effects instead of usinge ", fe" in order to see if i get more logical results that way. However that didn't work in my case, because of "too many values in countrypairs". Do you maybe now why this happens? Also thank you about sharing the ppml approach - I was planning on applying this estimator as well but first I wanted to clarify why I received the error messages in the OLS FE approach.

        Nick Cox Thanks for pointing that out, i forgot about that.

        Comment


        • #5
          Dear Imke Taylor,

          First, I would not worry about the R2; it rarely is relevant. Second, I cannot really answering your question without knowing exactly what you are doing and what your data looks like.

          Best wishes,

          Joao

          Comment


          • #6
            Hello all, I am new to Stalist, and I do not know where to raise questions. I am doing research on agricultural trade by using Myanmar export data with 20 importing countries (2010-2021). By using ppml I have some problem with Fixed effects. The stata command that I use ppml exportvalue lndist lngdppc lnpop lntarrf lnunitp1 sps_un4 combor IMPORTER_FE* TIME_FE*. However, the time fixed effects works well but importer fixed does not (convergence not achieved). Could you please help me how to overcome this?
            Last edited by sladmin; 03 Dec 2024, 15:13. Reason: anonymize original poster

            Comment


            • #7
              Please use ppmlhdfe instead of ppml.

              Comment


              • #8
                Professor, in ppml regression, if ppmlhdfe is the fixed effects model, can we say only ppml is random effects?

                Comment


                • #9
                  No, ppml estimates a plain Poisson regression model just like ppmlhdfe, but the latter makes it easier to include fixed effects. Random effects should not be used in this context.

                  Comment


                  • #10
                    Thank you, Professor. Please let me add one more question, in PPML regression, can we use export decimal data, or does it have to be an integer?

                    Comment


                    • #11
                      The dependent variable does not have to be an integer.

                      Comment


                      • #12
                        Thank you again, Professor. In ppmlhdfe, constant coefficient is not significant, but interested parameters are consistent with the gravity model theory. Can we say that ppml is not a good model for that? Or constant coefficient is negligible?

                        Comment


                        • #13
                          The constant is meaningless because of the fixed effects, so it can be ignored. Note also that PPML is not a model but an estimator for the gravity model.

                          Comment


                          • #14
                            Noted Professor. Thank you.

                            Comment


                            • #15
                              Joao Santos Silva hi professor, if the command is ppmlhdfe exportvalue lndist lngdppc lnpop lntarrf lnunitp1 sps_un4 IMPORTER_FE* TIME_FE* , is it possible to drop IMPORTER_FE* TIME_FE* ? And can we still consider as fixed effects in the absent of those two?

                              Comment

                              Working...
                              X