Announcement

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

  • Poisson with fixed effects and clustered standard errors convergence problem

    Dear all,

    I am estimating a gravity model using the Poisson pseudo-maximum likelihood estimator. My model includes origin-year, destination-year and country pair fixed effects. I would like to cluster standard errors at the country pair level. I have the following problems:

    - if I estimate the model using xtpoisson the estimation does not converge.
    - if I estimate the model using ppml the model converges but no standard errors are reported.

    I have in my sample about 120 countries and 30 years. Does anyone know if there exists a solution to this problem?

    Thank you in advance!

    Best regards,

    Camilo

  • #2
    Dear Camilo,

    From what you describe, you really need to use -ppml- to get convergence.

    About the standard errors, the likely reason for your problem is the presence of dummy variables with just one observation equal to 1 (the so-called singletons). You can investigate this by doing a -summarize- of your dummies using the sample used by -ppml-. That is, after estimating, type
    Code:
    su YOUR DUMMIES HERE if e(sample)
    and check if there are any variables with mean equal to 1 over the number of observations used.

    Another thing to consider is that you are using a lot of "fixed effects", maybe too many. Among other things, this is likely to create very strong collinearity which will make the estimation of the covariance quite challenging.

    Best of luck,

    Joao

    Comment


    • #3
      Dear Joao,

      Thank you very much for your suggestion. I checked and there are no singletons in the sample ppml keeps for estimation. Would you have any other clues about what might be causing the problem (other than the difficulties associated with the estimation of the covariance with so many dummies)?


      Many thanks,

      Camilo

      Comment


      • #4
        Dear Camilo,

        Please make sure you follow the advice we give here; that is, create all the fixed effects without excluding the base category and include them all in the model; that is, let the estimator choose which variables to drop (therefore, do not use the xi prefix). If that does not work, it may help you start by removing collinear regressors using the _rmcoll before you actually use the estimator.

        Best of luck,

        Joao
        Last edited by Joao Santos Silva; 14 Jul 2015, 06:57. Reason: Included reference to xi prefix

        Comment


        • #5
          Dear Prof Silva,
          I just had a broad question. how can we cluster standard errors in a gravity model?

          Comment


          • #6
            Originally posted by Joao Santos Silva View Post
            Dear Camilo,

            Please make sure you follow the advice we give here; that is, create all the fixed effects without excluding the base category and include them all in the model; that is, let the estimator choose which variables to drop (therefore, do not use the xi prefix). If that does not work, it may help you start by removing collinear regressors using the _rmcoll before you actually use the estimator.

            Best of luck,

            Joao
            Dear Prof Silva,
            I just had a broad question. how can we cluster standard errors in a gravity model?
            Best,
            Mahdi

            Comment


            • #7
              Dear Mahdi,

              Just use the option "cluster" to cluster by pair (often people cluster by distance which should do the same).

              Best regards,

              Joao

              Comment


              • #8
                Originally posted by Joao Santos Silva View Post
                Dear Mahdi,

                Just use the option "cluster" to cluster by pair (often people cluster by distance which should do the same).

                Best regards,

                Joao

                Thank you so much professor,
                but i was thinking that i should cluster by country-pairs? is that right?
                Best,

                Comment


                • #9
                  Yes, that is right. In principle clustering by distance is the same thing (assuming that no 2 pairs have the same distance).

                  All the best,

                  Joao

                  Comment


                  • #10
                    Originally posted by Joao Santos Silva View Post
                    Yes, that is right. In principle clustering by distance is the same thing (assuming that no 2 pairs have the same distance).

                    All the best,

                    Joao
                    Thanks a lot Professor,
                    just one another question, how can i test heteroscedasticity in a xtpoisson estimation?
                    Best,
                    Mahdi

                    Comment


                    • #11
                      You can do it but it takes a bit of work. Do you really need to test for hetero? Poisson regression with robust (clustered) standard errors should be pretty robust to heteroskedasticity.

                      All the best,

                      Joao

                      Comment


                      • #12
                        Originally posted by Joao Santos Silva View Post
                        You can do it but it takes a bit of work. Do you really need to test for hetero? Poisson regression with robust (clustered) standard errors should be pretty robust to heteroskedasticity.

                        All the best,

                        Joao
                        Thank you. All right. so, if it's robust, i don't need to test for hetero anymore.
                        In general, could you please introduce me a simple reference for reading about heteroscedasticity and the was that can i test it in a gravity model.
                        I'm so sorry for asking too many questions.
                        Best,
                        Mahdi

                        Comment


                        • #13


                          Dear Mahdi,

                          We discuss those tests here, and give additional references. However, to use these tests with FE estimators you first need to get fitted values and residuals using something of the kind I suggested here (see the code in #2).

                          All the best,

                          Joao


                          Comment


                          • #14
                            Originally posted by Joao Santos Silva View Post

                            Dear Mahdi,

                            We discuss those tests here, and give additional references. However, to use these tests with FE estimators you first need to get fitted values and residuals using something of the kind I suggested here (see the code in #2).

                            All the best,

                            Joao

                            Sorry again Professor,
                            I just read your paper, but i'm a bit confused about how can i perform Park and Ramsey test after getting xtpoisson estimations?
                            Many thanks in advance

                            Comment


                            • #15
                              Originally posted by Mahdi Gholami View Post
                              Sorry again Professor,
                              I just read your paper, but i'm a bit confused about how can i perform Park and Ramsey test after getting xtpoisson estimations?
                              Many thanks in advance
                              I mean in Stata

                              Comment

                              Working...
                              X