Announcement

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

  • PPMLHDFE - Regression not starting

    Dear Statalist forum,

    I am currently tring to run a gravity equation using the PPMLHDFE command and saving the estimates for my fixed effects, as i have to use these in a further study. The regression i am running is the following:

    ppmlhdfe trade, abs( i#k j#k i#j, savefe)


    Where:

    i= Exporter
    j= Importer
    k= sector (HS6 - 5200 different in the dataset).

    I have bilateral trade for 99 countries and therefore i in total have : 50,440,698. I am using STATA I/C and running the regression on a computer with 32 GB ram and I7 processor.
    The problem is that the regression never seems to begin the furthest i have gotten is this:

    ppmlhdfe v, abs(i#k j#k i#j, savefe)
    (dropped 1.84e+07 observations that are either singletons or separated by a fixed effect)

    It never begins undertaking the iterations.

    My question is am i simply demanding to much of my system ? Or is there something i am doing wrong in terms of the coding?.. I have look through several forums and cant seem to find an answer for this.


    After having read some of PPMLHDFE: Fast Poisson Estimation withHigh-Dimensional Fixed Effects, i would expect on of the following to be able to answer this:

    Sergio Correia Tom Zylkin Paulo Guimaraes


    However advice from anyone, would be highly apperciated !
    Last edited by Rune Langkjaer; 22 Apr 2020, 02:51.

  • #2
    Hi Rune,
    The most likely reason why the regression is not starting is that one of the separation checks is not finishing. Try adding the option "sep(fe simplex)".
    Regards,
    Tom

    Comment


    • #3
      Also, it may be helpful to keep trade of any zeroes that are perfectly predicted by your fixed effects and drop them beforehand. This will likely shrink your dataset by a lot.

      Comment


      • #4
        Dear Tom Zylkin ,

        Thank you very much for your recommendations and for taking your time to answer me, it is highly appericiated !

        In relation too your comment in #3, if i have understood it correctly this would mean that i would have to remove observations where e.g. A country have not traded a specific product in my dataset with any of its partners, i.e. if The US have not exported product 600124 (and thereby its a zero across all its observations for this product) and all observations that is zero across importer and exporter i.e countries that havent traded with each other. This would reduce my dataset by 18387779 observations - approximately equal to what i posted the ppmlhdfe dropped in #1.

        Is this the correct understanding?

        Best

        Rune Langkjær
        Last edited by Rune Langkjaer; 22 Apr 2020, 07:17.

        Comment


        • #5
          Originally posted by Rune Langkjaer View Post
          Dear Tom Zylkin ,

          Thank you very much for your recommendations and for taking your time to answer me, it is highly appericiated !

          In relation too your comment in #3, if i have understood it correctly this would mean that i would have to remove observations where e.g. A country have not traded a specific product in my dataset with any of its partners, i.e. if The US have not exported product 600124 (and thereby its a zero across all its observations for this product) and all observations that is zero across importer and exporter i.e countries that havent traded with each other. This would reduce my dataset by 18387779 observations - approximately equal to what i posted the ppmlhdfe dropped in #1.

          Is this the correct understanding?

          Best

          Rune Langkjær
          Hi Rune,
          Yes that's correct. If I understand your FEs properly, you would delete all instances where a country never exports a product, all instances where a country never imports a product, and all pairs that do not trade with each other in any products.
          Regards,
          Tom

          Comment


          • #6
            Dear Tom Zylkin,

            Your recommendations fixed the problem, You are a Legend !

            Best

            Rune Langkjær

            Comment

            Working...
            X