Announcement

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

  • estimate gravity model with IVPOISSON command

    Hello everyone,

    I estimate a gravity model with the following stata code:

    ivpoisson gmm imports (immigsh = immigsh10) lnGDP_o lnGDP_d lnpop10_o lnpop10_d lndistw1990 lndistw1995 lndistw2000 lndistw2005 lndistw2010 lndistw2015 border comlang_off comlang_ethno comcol rta2 sumlandlocked tdiff comcur2 lnarea_o lnarea_d orig dest, vce(cluster pairid)


    I get this error message: Hessian is not positive semidefinite


    Could someone help me to understand and overcome this problem ?

    Best regards,

    Morel

  • #2
    It looks as if you are including both origin and destination fixed effects and origin and destination characteristics. If you include those fixed effects, you should not (and do not need to) include regressors that are characteristics of the origin and destination.

    Comment


    • #3
      Dear Joao Santos Silva,

      Thanks for the help. I will take into account your suggestion.

      I thought this was a scaling problem.

      I give some details about my variables computation.
      imports = imports in millions constant USD
      immigsh = immigration stock as share of destination country population
      immigsh10 = 10 years lagged values of the immigration share (serve as instrument)
      lnGDP = ln (GDP constant USD / 1000)
      lnpop = ln (population / 1000)
      lndistw* = log of distance * time dummy; i include time dummy to capture reduction of distance effect due to improvements in transportation infrastructure (airports, ports, roads).
      border = dummy for common border
      comlang_off = dummy for sharing an official language
      comlang_ethno = dummy for sharing an ethnical language
      comcol = dummy for common colonizer
      rta2 = dummy for regional trade agreement
      sumlandlocked = dummy for landlocked countries
      tdiff = time zone diffrence in hours
      comcur2 = dummy for sharing common currency
      lnarea = ln (area / 1000)

      Comment


      • #4
        Dear Joao Santos Silva,

        As you suggested, i remove the origin and destination fixed effects.

        But i still have the same error message.

        Should i use the ivppml command instead of ivpoisson ?

        Best regards

        Comment


        • #5
          Do you get the same warning if you use ppmlhdfe?

          Comment


          • #6
            Dear Joao Santos Silva,

            I tried ppmlhdfe (code below) and get unreliable estimates, with some of my regressors wrong signed, large standards errors and confidence intervals.

            ppmlhdfe imports immigsh lnGDP_o lnGDP_d lnpop_o lnpop_d lndistw1990 lndistw1995 lndistw2000 lndistw2005 lndistw2010 lndistw2015 border comlang_off comlang_ethno comcol rta2 comcur2 lnarea_o lnarea_d

            Maybe it's a multicolinearity problem but i don't know which variables among mine could be colinear.

            I will try include each regressor step by step.

            Comment


            • #7
              Yes, that is a good idea.

              Comment


              • #8
                Okay Dr Joao Santos Silva.

                Concern my variables computation, did it seems good to you ?

                Another question I have is: does the number of variables increase the slower the convergence ?

                Comment


                • #9
                  Indeed, more variables will slow the estimation.

                  Comment


                  • #10
                    Joao Santos Silva I am working on structural gravity model of trade. I need to tackle endogeniety for my model but i am not sure about the command to us with ppmlhdfe for IVs. The above command doesnot fulfil conditions of my model. I am using these two commands to serve the propose of my model. Can you please guide me about ivpoisson command for these models? First one is for time series one year data and second one is for a panel data of 54 countries spanning 30 years data.
                    ppmlhdfe uncomx ldist bor contig comcol comlang_off rta X , absorb(exporters importers) cluster(exporters#importers)
                    ppmlhdfe uncomx rta X, absorb(exporters#year importers#year exporters#importers) cluster(exporters#importers) d

                    Any help and guidance is much appreciated.

                    Thank you

                    Comment


                    • #11
                      Dear Shamsa Kanwal,

                      Using IV with gravity equations is challenging, not the least because it is difficult to find good instruments. Can you say more about what you are doing and why you need IV?

                      Best wishes,

                      Joao

                      Comment


                      • #12
                        Dr @Joao Santos Silva I am using trade and technology in my structural gravity model and both cause each other therefore I am asked to tackle endo for this model. I am looking for exact command for it now. Looking into instruments wont be so hard i guess. What is your stance on it?

                        Comment


                        • #13
                          Sorry, can you please provide more detail? What is the dependent variable, what are the explanatory variables, why are they endogenous, and what instruments will you use?

                          Comment


                          • #14
                            Dear Joao Santos Silva, I am trying to analyze the effect of foreign currency reserves on import trade flow of one country from multiple countries with gravity model specifications. Is this possible to do with PPMLHDFE?

                            Comment


                            • #15
                              Yes, that should not be a problem.

                              Best wishes,

                              Joao

                              Comment

                              Working...
                              X