Announcement

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

  • #16
    Dear Professor Santos,

    Using the stata I was a bit confused by the existence of 2 commands to run the Poisson regression: poisson and ppml. By doing a first check (running both options), it seems that those commands give identical results. Is it correct that there is no difference between them?

    Thank you in advance for this clarification.
    Best regards,
    Daria

    Comment


    • #17
      Dear Daria,

      It is indeed true that in general both estimators will lead to the same result. The advantage of -ppml- is that it is less likely to have convergence issues. So, if -poisson- converges without problem, -ppml- has no advantage at all; otherwise try -ppml-.

      Best wishes,

      Joao

      Comment


      • #18
        Dear Professor Santos,

        thank you a lot for your reply!

        Best Regards,
        Daria

        Comment


        • #19
          Dear professor Santos,

          I am estimating the effect the EMU had on trade flows within Europe, through the use of three dummy variables which will explain trade creation and diversion in terms of imports and exports.
          My sample is approximately 40 European countries between the period 1990-2013 (43,000) observations.
          As a result of the three dummy variables, my most rigorous specification only includes dyadic fixed effects and year fixed effects (as i am unable to include importer year and exporter year fixed effects).
          Based on the posts on this forum i used the command
          xtpoisson exp1to2w0s lgdp1 lgdp2 emu emu_1 emu_2 dyear*, fe robust
          (trying to control for dyadic FE and year FE)

          However, from my results, i am getting a negative coefficient for all three dummy variable of interest (which are significant).
          This is very surprising to me and i can't see this being accurate, is the command i am using correct?
          Thankyou for any help you may have on this in advance!

          Comment


          • #20
            Dear Harry,

            Your specification looks a bit strange because you are missing the origin and destination dummies; if you do not include these you should at least include country characteristics such as GDP. I suggest you estimate the model including origin and destination FE by year. You can do that easily with the command ppml_panel_sg.

            Best wishes,

            Joao

            Comment


            • #21
              Dear Jaoo,

              Thankyou for your reply!! it is much appreciated

              Comment


              • #22
                Originally posted by Joao Santos Silva View Post
                Dear Ella,

                Because you are just looking at exports from one country, the pair fixed effects I mentioned above are just destination fixed effects. So, you should get the same results if you do either of the following:
                Code:
                 xi: ppml export year lang rel ccmon gfc fta lntwp mend lnprodgdpc lnprodgdp lnrlxrtindex i.dcode, cluster(dcode)
                xtpoisson export year lang rel ccmon gfc fta lntwp mend lnprodgdpc lnprodgdp lnrlxrtindex, i(dcode) cluster(dcode)
                I am not going to comment on the details of the specification you should use because I do not have enough information to do it; you should discuss that with your adviser.

                Best wishes,

                Joao


                Dear Prof. Santos,


                I tried, both the following codes in my gravity model(using the corect variable names of my data set).

                xi: ppml export year lang rel ccmon gfc fta lntwp mend lnprodgdpc lnprodgdp lnrlxrtindex i.dcode, cluster(dcode)
                xtpoisson export year lang rel ccmon gfc fta lntwp mend lnprodgdpc lnprodgdp lnrlxrtindex, i(dcode) cluster(dcode)[/CODE]

                'ppml' has functioned properly. But 'xtpoisson' gave me an error message as follows.


                varlist required
                r(100);

                Could you please tell me as what to correct here?

                Thank you.

                Kind regards
                Kumuthini

                Comment


                • #23
                  Dear Kumuthini,

                  Please check that what you showed us is exactly what you typed.

                  Best wishes,

                  Joao

                  Comment


                  • #24
                    Dear Prof. Joao,



                    Thank you very much for the reply.
                    (I’m excited to getting connected with you)


                    I have four questions to clarify.


                    I followed your guidance to Ella and used ‘xtpoisson’ as follows. But it gave me an error saying ‘varlist required’. But I’m keen on seeing whether both give the same results.

                    1. What's wrong in the following code?


                    . xtpoisson Exports lnSL_GDPMn lnGDPMn lnSL_POPMn lnPOPMn lnDistanceKm NoLandLock CommonLanguage ColonialConnection WTOMember TFA GSP, i(Country_ID) cluster(Country_ID)
                    varlist required
                    r(100);


                    I used ‘ppml’ as follows and got the results. But I see a warning as follows:

                    WARNING: lnGDPMn has very large values, consider rescaling or recentering

                    2. Can I ignore that warning? Because I already rescaled my numbers to Millions.




                    . xi: ppml Exports_SL TimeD202_08 TimeD309_16 lnSL_GDPMn lnGDPMn lnSL_POPMn lnPOPMn lnDistanceKm lnTARIFF No
                    > LandLock CommonLanguage WTOMember GSP i.Country_ID, cluster(Country_ID)
                    i.Country_ID _ICountry_I_2-77 (naturally coded; _ICountry_I_2 omitted)

                    note: checking the existence of the estimates
                    WARNING: lnGDPMn has very large values, consider rescaling or recentering

                    Number of regressors excluded to ensure that the estimates exist: 5
                    Excluded regressors: _ICountry_I_13 _ICountry_I_41 _ICountry_I_45 _ICountry_I_62 _ICountry_I_76
                    Number of observations excluded: 0

                    note: _ICountry_I_8 omitted because of collinearity

                    note: starting ppml estimation
                    note: Exports_SL has noninteger values

                    Iteration 1: deviance = 31112.07
                    Iteration 2: deviance = 13275.12
                    Iteration 3: deviance = 10559.59
                    Iteration 4: deviance = 10081.98
                    Iteration 5: deviance = 9998.865
                    Iteration 6: deviance = 9984.941
                    Iteration 7: deviance = 9982.92
                    Iteration 8: deviance = 9982.616
                    Iteration 9: deviance = 9982.555
                    Iteration 10: deviance = 9982.548
                    Iteration 11: deviance = 9982.548
                    Iteration 12: deviance = 9982.548

                    Number of parameters: 79
                    Number of observations: 1366
                    Pseudo log-likelihood: -8132.8905
                    R-squared: .97386534
                    Option strict is: off
                    (Std. Err. adjusted for 72 clusters in Country_ID)
                    --------------------------------------------------------------------------------
                    | Robust
                    Exports_SL | Coef. Std. Err. z P>|z| [95% Conf. Interval]
                    ---------------+----------------------------------------------------------------
                    TimeD202_08 | -.2022761 .1046268 -1.93 0.053 -.4073409 .0027887
                    TimeD309_16 | -.2790783 .1096328 -2.55 0.011 -.4939545 -.064202
                    lnSL_GDPMn | .1518802 .1738648 0.87 0.382 -.1888885 .4926489
                    lnGDPMn | .8220176 .1005791 8.17 0.000 .6248861 1.019149
                    lnSL_POPMn | .8096593 1.862004 0.43 0.664 -2.839802 4.459121
                    lnPOPMn | -.5273661 .3925757 -1.34 0.179 -1.2968 .242068
                    lnDistanceKm | -1.669795 .757471 -2.20 0.027 -3.15441 -.1851787
                    lnTARIFF | -.4072065 .1285248 -3.17 0.002 -.6591104 -.1553026
                    NoLandLock | 7.709235 .1208886 63.77 0.000 7.472297 7.946172
                    CommonLanguage | -1.523925 .7327232 -2.08 0.038 -2.960036 -.0878144
                    WTOMember | -1.184909 .4859362 -2.44 0.015 -2.137326 -.2324917
                    GSP | 3.573232 .3738587 9.56 0.000 2.840482 4.305982
                    _ICountry_I_3 | 3.099814 .8621647 3.60 0.000 1.410002 4.789626
                    _ICountry_I_4 | -1.694019 .618055 -2.74 0.006 -2.905385 -.4826536
                    _ICountry_I_5 | -.2176373 1.730449 -0.13 0.900 -3.609254 3.17398
                    _ICountry_I_6 | 6.274484 .1307735 47.98 0.000 6.018173 6.530796
                    _ICountry_I_7 | -1.709273 .7650034 -2.23 0.025 -3.208652 -.2098936
                    _ICountry_I_9 | -6.024113 1.032784 -5.83 0.000 -8.048333 -3.999893
                    _ICountry_I_10 | -5.750661 .7006272 -8.21 0.000 -7.123865 -4.377457
                    _ICountry_I_11 | -1.432765 .7151299 -2.00 0.045 -2.834394 -.0311366
                    _ICountry_I_12 | 1.295653 .3281611 3.95 0.000 .652469 1.938837
                    _ICountry_I_14 | -.6744911 2.651987 -0.25 0.799 -5.87229 4.523308
                    _ICountry_I_15 | -5.068178 .9849897 -5.15 0.000 -6.998722 -3.137633
                    _ICountry_I_16 | -5.188462 1.301508 -3.99 0.000 -7.739371 -2.637553
                    _ICountry_I_17 | 3.205111 .7537622 4.25 0.000 1.727764 4.682458
                    _ICountry_I_18 | -4.622369 .9919996 -4.66 0.000 -6.566652 -2.678085
                    _ICountry_I_19 | .5423551 .7676185 0.71 0.480 -.9621494 2.04686
                    _ICountry_I_20 | -5.381872 1.400245 -3.84 0.000 -8.126302 -2.637441
                    _ICountry_I_21 | -5.606025 .936285 -5.99 0.000 -7.44111 -3.77094
                    _ICountry_I_22 | -2.804278 .1397237 -20.07 0.000 -3.078131 -2.530424
                    _ICountry_I_23 | -2.205712 .0672519 -32.80 0.000 -2.337523 -2.073901
                    _ICountry_I_24 | -5.59108 .5931712 -9.43 0.000 -6.753674 -4.428486
                    _ICountry_I_25 | 3.042695 .7232982 4.21 0.000 1.625057 4.460334
                    _ICountry_I_26 | -2.765941 1.80954 -1.53 0.126 -6.312574 .7806925
                    _ICountry_I_27 | 1.188669 2.7217 0.44 0.662 -4.145764 6.523103
                    _ICountry_I_28 | .1698081 1.390973 0.12 0.903 -2.556448 2.896065
                    _ICountry_I_29 | -.8447958 1.388683 -0.61 0.543 -3.566564 1.876973
                    _ICountry_I_31 | -4.219373 1.171193 -3.60 0.000 -6.51487 -1.923877
                    _ICountry_I_32 | -.3498196 .2037096 -1.72 0.086 -.749083 .0494439
                    _ICountry_I_33 | -2.368592 .0982977 -24.10 0.000 -2.561252 -2.175932
                    _ICountry_I_34 | .2097646 .6632242 0.32 0.752 -1.090131 1.50966
                    _ICountry_I_35 | .9669689 .2857277 3.38 0.001 .4069528 1.526985
                    _ICountry_I_36 | -.0515798 .4669216 -0.11 0.912 -.9667293 .8635697
                    _ICountry_I_37 | -1.323579 .3526495 -3.75 0.000 -2.014759 -.6323982
                    _ICountry_I_38 | 3.819477 .328135 11.64 0.000 3.176344 4.46261
                    _ICountry_I_39 | -4.903651 1.223617 -4.01 0.000 -7.301897 -2.505406
                    _ICountry_I_40 | -1.45187 .1657913 -8.76 0.000 -1.776815 -1.126925
                    _ICountry_I_42 | -4.893922 1.081105 -4.53 0.000 -7.012849 -2.774995
                    _ICountry_I_43 | .0668689 1.957467 0.03 0.973 -3.769697 3.903435
                    _ICountry_I_44 | -.9614756 .9164689 -1.05 0.294 -2.757722 .8347704
                    _ICountry_I_46 | -6.271718 1.833448 -3.42 0.001 -9.865211 -2.678226
                    _ICountry_I_47 | 2.614562 .3062304 8.54 0.000 2.014362 3.214763
                    _ICountry_I_48 | -4.394804 1.250318 -3.51 0.000 -6.845382 -1.944226
                    _ICountry_I_49 | 5.743431 .970004 5.92 0.000 3.842258 7.644604
                    _ICountry_I_50 | -2.843869 .6117805 -4.65 0.000 -4.042936 -1.644801
                    _ICountry_I_51 | -.003089 .9418127 -0.00 0.997 -1.849008 1.84283
                    _ICountry_I_52 | -1.500709 .7342042 -2.04 0.041 -2.939723 -.0616952
                    _ICountry_I_53 | -2.205413 .0977997 -22.55 0.000 -2.397097 -2.013729
                    _ICountry_I_54 | 1.036833 1.54041 0.67 0.501 -1.982315 4.055981
                    _ICountry_I_55 | -.7631782 .9313255 -0.82 0.413 -2.588543 1.062186
                    _ICountry_I_56 | -3.528954 .2156021 -16.37 0.000 -3.951526 -3.106382
                    _ICountry_I_57 | -4.980912 .8456335 -5.89 0.000 -6.638323 -3.323501
                    _ICountry_I_58 | -2.577615 .4799157 -5.37 0.000 -3.518233 -1.636998
                    _ICountry_I_59 | -5.162304 .3671813 -14.06 0.000 -5.881966 -4.442642
                    _ICountry_I_60 | .3214755 1.473072 0.22 0.827 -2.565693 3.208644
                    _ICountry_I_61 | -.6349799 .4642865 -1.37 0.171 -1.544965 .2750049
                    _ICountry_I_63 | 3.624633 .9548347 3.80 0.000 1.753191 5.496075
                    _ICountry_I_64 | -5.493469 1.274197 -4.31 0.000 -7.990849 -2.99609
                    _ICountry_I_65 | .347045 .3746168 0.93 0.354 -.3871904 1.08128
                    _ICountry_I_66 | -3.455573 .2971563 -11.63 0.000 -4.037988 -2.873157
                    _ICountry_I_68 | -3.98941 .765072 -5.21 0.000 -5.488924 -2.489897
                    _ICountry_I_69 | 7.822631 .587033 13.33 0.000 6.672067 8.973195
                    _ICountry_I_71 | -.4510075 1.263926 -0.36 0.721 -2.928257 2.026242
                    _ICountry_I_72 | .1883922 .6100565 0.31 0.757 -1.007296 1.384081
                    _ICountry_I_73 | 1.061098 .46202 2.30 0.022 .1555556 1.966641
                    _ICountry_I_74 | .0119871 .1582506 0.08 0.940 -.2981784 .3221525
                    _ICountry_I_75 | -1.188637 .1871336 -6.35 0.000 -1.555412 -.8218618
                    _ICountry_I_77 | -.1116594 1.220517 -0.09 0.927 -2.503829 2.28051
                    _cons | -.4560818 9.004812 -0.05 0.960 -18.10519 17.19303
                    --------------------------------------------------------------------------------



                    3. Could you please correct my following understandings?


                    The standard errors I got here, while using ‘ppml’ command with ‘cluster’ is, robust.
                    The application of ‘ppml’ here is equivalent to using xtpoisson with FE option. The reason why my time-invariant variables (Distance and other dummy variables) were not eliminated(Though I'm using FE option) is because, here “ppml” method uses Least Square Dummy Variable method for the construction of FE estimator by externally adding destination dummies (Achieved by the code “xi: ppml”)

                    Am I correct?

                    PPML estimation of my model gives the coefficients as follows for two variables.


                    4. Could you please confirm whether my interpretation of them are correct?
                    Regressor Coefficient Interpretation
                    lnGDPMn 0.822 1% increase in GDP, increases the Exports (which is in million) by 8,220 dollars ( 0.8220*1000,000 / 100 )
                    GSP (dummy var) 3.573 At the presence of GSP, Exports increase by 357.3%

                    Looking forward to your reply.


                    Kind regards

                    Kumuthini

                    Comment


                    • #25
                      Dear Kumuthini Sivathas,

                      1 - I have no idea what the problem can be. Please try with a simpler model to see if you can identify the problem or try xtpqml.

                      2 - Do not worry.

                      3 - I do not know the structure of your data, so it is difficult to comment. Note, however, that several fixed effects are being dropped and maybe they are being dropped instead of the time invariant variables.

                      4 - Your interpretation is incorrect. The first parameter is an elasticity and the second a semi-elasticity. Please check these definitions in a good econometrics textbook.

                      Best wishes,

                      Joao

                      Comment


                      • #26
                        Dear Dr Joao,


                        Thank you very much for your guidance.

                        For my 1st question: As you mentioned I tried ‘xtpqml’ and it functioned. But it is not similar to the results of ‘ppml’.
                        However, Is not it has to be same as ‘ppml’ results as ‘xtpqml’ is just the wrapper of ‘xtpoisson’ with robust standard error and those are again similar ‘ppml’?

                        For my 3rd question: I’m interested in modelling the Exports of Switzerland with its 75 trading partners. Same as, again I will be modelling the Imports of Switzerland with the same 75 trading partners. I will have two separate regressions. I’m interested in the coefficients of GDP, Population, Distance and some other dummy variables. I should use fixed effects as to capture the heterogeneity of destination countries. Generally, if I use ‘FE’ option with any other methods, I cannot observe the coefficients of the time invariant variables like Distance and dummy variables as they are getting dropped.
                        But in ‘PPML’ method, they are not eliminated, although ‘PPML’ uses Fixed effects method. How is it possible? I would like to know the basics underneath as to understand the methodology well.
                        Another question: If I want to get the Random effects results by using ‘PPML’, how should I amend the code?

                        For my 4th Question: Thanks so much. I learnt that the interpretation while using ‘ppml’ method (Though it is a multiplicative regression) is like the interpretation of coefficients of Log-linear gravity model.

                        Question no. 5 (New): I included Time dummies in the model and then interacted them with other Variables. When I run the regression, it said, “No observations observed” and did not give any output. What might be reason for this?


                        Kind regards
                        Kumuthini

                        Comment


                        • #27
                          Sorry for the late reply.

                          1 - xtpqml, xtpoisson and ppml with the right dummies should produce exactly the same estimates.

                          3 - we have a choice between dropping fixed effects or dropping time-invariant regressors; ppml is dropping fixed effects and keeping time-invariant regressors but the estimates of these coefficients are meaningless and they should notbe includedin theregression. Do not userandom effects in this context.

                          5 - You must be doing something wrong there.

                          Best wishes,

                          Joao

                          Comment


                          • #28
                            Thank you Prof. Joao,


                            I was waiting to see your comments.

                            Regarding your answer to my Question No. 3.

                            If i should not include the time invariant variables in PPML, what are the alternative available to measure the coefficients of time invariant variables like Distance and some dummy variables?

                            Kindly advise me.

                            Regards
                            Kumuthini

                            Comment


                            • #29
                              I do not think there is an alternative; I am sorry...

                              Joao

                              Comment


                              • #30
                                This is noted with Thanks Prof. Joao

                                Comment

                                Working...
                                X