Announcement

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

  • Gravity model using ppml and time varying fixed effects

    Hi,
    I was hoping to get some help with my dissertation. I'm trying to study how terrorism affects bilateral trade and am using panel data for 164 countries. I am using the ppml estimator (because of zero trade observations) with time varying fixed effects for importer and exporter. However half of my dummies for time varying fixed effects get dropped from the model due to collinearity. I have pretty much tried everything and can't seem to get around this problem. Request your advice. Thanks.

  • #2
    DearAishwarya,

    Are the dummies really dropped because of collinearity, or are they dropped for the estimator to exist? In any case, dropping these variables may be perfectly legitimate and the right thing to do, so this may not be a problem.

    Best wishes,

    Joao

    Comment


    • #3
      Hello
      I have the same question regarding ppml. I am trying to get the trade creation and diversion effects of a single FTA using panel data. But my sample includes 33 countries over a 15 year time period. While estimating the equation with importer and exporter time fixed effects, it omits many fixed effects due to collinearity and also drops observations to ensure that estimates exist. Further when I include country pair fixed effects along with the importer exporter fixed effects and RTA dummies, again it omits fixed effects due to collinearity and the result only gives the coefficient leaving the standard errors p- values and other columns as blank. How to resolve this issue. Also I would like to know if PPML model is not suitable for relatively less number of observation e.g. my estimation includes around 14,000 observations. Does missing values in one of the explanatory variables can cause a problem?
      Thank you very much.

      Regards
      Richa

      Comment


      • #4
        Dear Richa,

        You mention a number of different issues:

        - Dropping variables due to collinearity or to ensure the estimator exists is not a problem; that is how it should be.

        - Having no standard errors is possibly the result of the presence of singletons in your data; there are a lot of posts about this so please look it up.

        - You need to be careful because you may be including too many "fixed effects"; consider carefully the specification of your model.

        - Your sample size should be OK.

        Best regards,

        Joao

        Comment


        • #5
          Dear Sir,

          Thank you so much for your response. I also tried excluding the constant term when introducing importer and exporter time along with pair fixed effects, as suggested by you in one of the posts, and the results were generated. The RESET test is also insignificant. Is this the correct procedure in my case ? Also if this is correct, do I need to run the other specifications with no constant term? What will be the correct approach to follow?
          Thank you very much.

          Best Regards
          Richa

          Comment


          • #6
            Dear Sir,

            I also tried identifying the singletons by the command in one of other posts. This is what I am getting:

            su exp_time_fe* imp_time_fe* pair_fes* if e(sample)

            Variable | Obs Mean Std. Dev. Min Max
            -------------+--------------------------------------------------------
            exp_time_fe1 | 0
            exp_time_fe2 | 0
            exp_time_fe3 | 0
            exp_time_fe4 | 0
            exp_time_fe5 | 0
            -------------+--------------------------------------------------------
            exp_time_fe6 | 0
            exp_time_fe7 | 0
            exp_time_fe8 | 0
            exp_time_fe9 | 0
            exp_time~e10 | 0
            -------------+--------------------------------------------------------
            exp_time~e11 | 0
            exp_time~e12 | 0
            exp_time~e13 | 0
            exp_time~e14 | 0
            exp_time~e15 | 0

            .. and so on for all the fixed effects. Did I use the command correctly and is this how the results should be generated? Or my estimation is wrong ?

            Comment


            • #7
              Dear Sir,
              I ran the model again and it did gave the mean values as well. But no mean value was greater than 1. This implies there are no singletons in my data? The results were :
              ime~523 | 15150 .0018482 .0429522 0 1
              imp_time~524 | 15150 .0018482 .0429522 0 1
              imp_time~525 | 15150 .0017822 .0421796 0 1
              imp_time~526 | 15150 .0018482 .0429522 0 1
              imp_time~527 | 15150 .0019142 .043711 0 1
              -------------+--------------------------------------------------------
              imp_time~528 | 15150 .0014521 .0380806 0 1
              pair_fes1 | 15150 .0020462 .0451902 0 1
              pair_fes2 | 15150 .0020462 .0451902 0 1
              pair_fes3 | 15150 .0020462 .0451902 0 1
              pair_fes4 | 15150 .0015182 .0389352 0 1
              -------------+--------------------------------------------------------
              pair_fes5 | 15150 .0020462 .0451902 0 1
              pair_fes6 | 15150 .0020462 .0451902 0 1
              pair_fes7 | 15150 .0020462 .0451902 0 1
              pair_fes8 | 15150 .0020462 .0451902 0 1
              pair_fes9 | 15150 .0020462 .0451902 0 1

              Thank you for your patient guidance.

              Best Regards

              Comment


              • #8
                Dear Richa,

                If you have 15150 observations, a singleton would have mean 1/15150 = 0.000066. From your output above it looks like this is not the problem. The fact that the problem goes away when you do not include the constant suggests that you had either a collinearity issue or you were over-fitting the zeros. Anyway, that is solved.

                It is a good thing that the model passes the reset; it is unlikely that you need to do more tests.

                All the best,

                Joao

                Comment


                • #9
                  Dear Sir,

                  Thank you so much for your guidance. But a quick silly query. A mean value greater than 0.000066 or less than this would mean the observation is singleton? Also then I must run the rest of the specifications without the constant as well ?

                  Thank you very much for solving this for me.

                  Best Regards

                  Comment


                  • #10
                    Dear Richa,

                    A singleton would have mean equal to 1/15150 = 0.000066, not above, not below.

                    You may run all the models without the constant, but you do not have to. Note that you should not report the estimate of the constant because it is meaningless if we do not report all the fixed effects.

                    Best regards,

                    Joao

                    Comment


                    • #11
                      Dear Sir,

                      Thank you so much for your useful inputs and guidance.

                      Thanks a lot.

                      Best Regards
                      Richa

                      Comment


                      • #12
                        Originally posted by Joao Santos Silva View Post
                        DearAishwarya,

                        Are the dummies really dropped because of collinearity, or are they dropped for the estimator to exist? In any case, dropping these variables may be perfectly legitimate and the right thing to do, so this may not be a problem.

                        Best wishes,

                        Joao
                        Dear sir,

                        Many thanks for getting back to me. Yes, the variables were being dropped for the estimator to exist, sorry about that. I was just worried by the large number of variables that were being dropped off. But if that is not an issue, then that's great! Many thanks!

                        Best regards,
                        Aishwarya

                        Comment


                        • #13
                          Dear Sir,

                          I have a query regarding the singletons. Some observations in my data have Zero mean values however none has the mean equal to 0.000066. The zeros are seen frequently in the exporter time fixed effects and in one observation for the pair FE and not at all in the importer_ time FE. Does this indicate that the fixed effects have not been generated properly ?
                          exp_time~436 | 15150 .0021122 .0459118 0 1
                          exp_time~437 | 15150 0 0 0 0
                          exp_time~438 | 15150 .0021122 .0459118 0 1
                          exp_time~439 | 15150 .0021122 .0459118 0 1
                          exp_time~440 | 15150 .0021122 .0459118 0 1
                          -------------+--------------------------------------------------------
                          exp_time~441 | 15150 0 0 0 0
                          exp_time~442 | 15150 0 0 0 0
                          exp_time~443 | 15150 0 0 0 0
                          exp_time~444 | 15150 0 0 0 0
                          exp_time~445 | 15150 0 0 0 0
                          -------------+--------------------------------------------------------
                          exp_time~446 | 15150 0 0 0 0
                          exp_time~447 | 15150 .0021122 .0459118 0 1
                          exp_time~448 | 15150 .0021122 .0459118 0 1
                          exp_time~449 | 15150 .0021122 .0459118 0 1
                          exp_time~450 | 15150 .0021122 .0459118 0 1
                          -------------+--------------------------------------------------------
                          exp_time~451 | 15150 .0021122 .0459118 0 1
                          exp_time~452 | 15150 .0021122 .0459118 0 1
                          exp_time~453 | 15150 .0021122 .0459118 0 1
                          exp_time~454 | 15150 .0021122 .0459118 0 1
                          exp_time~455 | 15150 .0021122 .0459118 0 1

                          Thank you

                          Best regards
                          Richa

                          Comment


                          • #14
                            It may be that, or simply you have no observations for those cases (for example, because you dropped them).

                            Best wishes,

                            Joao

                            Comment


                            • #15
                              Dear Sir,

                              Thank you so much for the response. Indeed they have been dropped during the estimation.

                              A query regarding the _rmcoll command. My estimates are probably wrong and a possible reason is collinearity. So I wanted to check the estimations again by identifying and dropping the collinear variables and then re-estimating. I used the following command :

                              '_rmcoll LANDLOCKED_i LANDLOCKED_j COLONY BORDER TC_ij TD_iin_jout TD_iout_jin ln_GDP_i ln_GDP_j ln_POP_i ln_POP_j ln_DIST ln_DIST exp_time_fe* imp_time_fe* pair_fes*,noconstant forcedrop'

                              But this not dropping the flagged collinear variables. Stata is not recognizing the command 'wrapem' as suggested in an earlier post. Could you please suggest any other way to drop these?

                              Thank you

                              Best Regards
                              Richa

                              Comment

                              Working...
                              X