Announcement

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

  • Dear Caroline,

    Indeed, you cannot interpret such results.

    The best thing would be to estimate the model without the variables that you know are collinear with the fixed effects. The number of estimated parameters and the R2 of the model should be exactly the same but you only have meaningful variables in the model. When you have fixed effects, you should consider commands such as xtpoisson and ppml_panel_sg that automatically deal with the fixed effects.

    Best wishes,

    Joao

    Comment


    • Dear Nuwani Dissanayake,

      Please do not post your results ad doc files; please check the FAQs about how to do it.

      Anyway, my guess is that your sample is far too small for you to be able to estimate so many parameters.

      Best wishes,

      Joao

      Comment


      • Dear Mr Silva
        I am sorry to bother you .Please allow me to introduce myself briefly ,i am a master student from China,and recently i am writing a paper urgently,and i need to use a ppml estimator as a method in my paper,in order to keep the model robust,i also need to use the fixed effects in the ppml estimator.But i am confusing what the stata code of double fixed effects(countrypair fixed effects and time fixed effects)of ppml estimator,and i could not find any clue.
        Looking forward to your reply !
        Sincerely,Alice

        Comment


        • Dear John Alice

          Please have a look at the user-written ppml_panel_sg.

          Best wishes,

          Joao

          Comment


          • Dear Mr Silva
            Thanks for your reply !I have seen the form of ppml_panel_sg. on user-written before.But i do not know what the _panel_sg means in my model?In this paper, I use the ppml method to estimate the bilateral trade flows between countries based on the gravity model. Finally, based on the ppml estimation results, we measure the openness of China's service industry from the perspective of tariff equivalents and make international comparisons. Now I want to show you the questions asked are summarized as follows:
            (1) I want to measure and compare the tariff equivalents of the service industries of the seven major service sectors of finance, telecommunications, tourism, and transportation services and so on in China and other countries. The choice of model can only be based on the same gravitational model?or Can i analysis based on multiple gravitational models?
            (2) "Based on the results of the ppml estimation, the openness of China's service industry is measured from the perspective of tariff equivalents and international comparisons" Do you think this topic has research value?
            (3) Is it necessary to do OLS regression before doing the empirical analysis of ppml? If the OLS regression parameter coefficient result is not significant, can I directly perform an empirical analysis of ppml?

            Comment


            • Dear John Alice,

              I am afraid I cannot comment on the particular research questions you are considering. I suggest you install pplm_panel_sg and check the help file. Finally, you do not need to use OLS; PPML is enough.

              Best wishes,

              Joao

              Comment


              • Dear @Joao Santos Silva

                I'm working on a panel data using gravity models to estimate the trade creation and trade diversion of free trade agreement. After browsing for a few days on the forum , I used ppml_panel_sg in STATA to perform the regression because I wanted to control time-exporter and time-importer effects on the one hand and country-pair effects on the other hand.

                My interests are the effects of FTAs, so I got three dummies(FTA_1 FTA_2 FTA_3) to present different kinds of trade creation and diversion:
                FTA_1 takes a value of 1 after 2013(since it is the time that the free trade agreement entered into force) if both exporter and importer are members of the trade agreement and zero otherwise.
                FTA_2 takes a value of 1 after 2013 if the exporter is a member of the trade agreement and importer is not and zero otherwise.
                FTA_3 takes a value of 1 after 2013 if the exporter is not a member of the trade agreement and the importer is and zero otherwise.

                My stata code is:
                ppml_panel_sg trade FTA_1 FTA_2 FTA_3, ex(exp) im(imp) y(year)

                But the STATA reported:
                note: FTA_2 omitted because of collinearity over lhs>0 (creates possible existence issue)
                note: FTA_3 omitted because of collinearity over lhs>0 (creates possible existence issue)

                I thought maybe there is something wrong with my dummy construction, but I have no idea how to deal with it.

                Also, I tried -xtpoisson- using code:
                xtpoisson trade ln_gdp_exp ln_gdp_imp ln_pop_exp ln_pop_imp ln_dist contig comlang FTA_1 FTA_2 FTA_3 dexpyear* dimpyear*, vce(cluster pair)
                But I waited for more than 24 hours and the stata was still runing even through it had completed 148 iterations.

                So here are my questions:
                1) Is there anything I can do to solve the problem that the STATA reported if I still want to use ppml_panel_sg(since it runs really fast)?
                2) Is my -xtpoisson- code correct? Or since my only interests are FTA variables, can I drop some variables(such as gdp, population and distance) from regressors to reduce the running time?

                Thanks very much for the atention.

                Comment


                • Dear Yalin Shing

                  I suspect that the proble is that you are including variables whose coefficients are not identified because they are collinear with the fixed effects. Please check this issue carefully.

                  Best wishes,

                  Joao

                  Comment


                  • Dear all,

                    I have a question regarding the models. I am currently writing my thesis and I am trying to treat Brexit as an exogenous shock to see whether it has had an effect on export or import. My data consists of ~155 countries from 1996-2017. I have started with an OLS estimation of the gravity equation that is accordingly

                    Code:
                    reg lnexport lndist contig comlang_off comcol fta_wto Brexit EUtrade export_* import_* year_*, robust
                    I am then trying to do the estimation of the PPML, which I have written accordingly

                    Code:
                    ppml export lndist contig comlang_off comcol fta_wto Brexit EUtrade export_* import_* year_*
                    So here are my questions:
                    1) Do I have to make adjustment in the PPML in order for it to resemble the OLS? - that is, for them to be comparable.
                    2) In panel data, I read, i believe from Georgetown, that it is not standard practice to include GDP. Is there an advantage/disadvantage to do so?
                    3) Is there better ways to go about the fixed effects and the standard errors?

                    Comment


                    • Dear John Nilsson,

                      1) No
                      2) Please see below
                      3) Typically importer and exporter fixed effects are allowed to vary by year. In that case GDP is redundant (and of course yo do not need time FE); have a look at the ppml_panel_sg. Standard errors are typically clustered by distance.

                      Best wishes,

                      Joao

                      Comment


                      • Dear Joao Santos Silva

                        Big thanks! Highly appreciated comments!

                        Sincerely,
                        John

                        Comment


                        • Dear Joao,

                          Many thanks for you replies on this. I've read through the posts above, but am still unsure if I am using the correct commands, I hope you can still help.

                          I have two panel datasets.

                          Panel 1 is count data of US imports (# of products) from 130 exporters over 48 years.

                          The command I used is: xtpoisson y x1 x2 i.year, fe r (1)

                          I tried the xtpoisson with i.year#i.exporter dummy but the model does not converge (xtpoisson y x1 x2 i.year#i.exporter, r)
                          If I am not mistaken, xtpoisson recognises the panel nature of the data however poisson does the same if i.year and i.exporter are incorporated? Unfortunately I cannot interact them.

                          This gets a little bit more complicated with my second panel.. Panel 2: has import data of 15 importers from 130 exporters over 48 years.

                          Here, can I use the same command as above (1)? I also cannot interact the i.year#i.exporter because of convergence issues. Very frustrating


                          Thanks in advance
                          Kind regards,
                          Ray















                          Comment


                          • Dear Ray Uddin,

                            Please see my reply to your other post.

                            Joao

                            Comment


                            • Dear Prof. Joao Santos Silva,

                              First of all, thank you very much for your previous feedbacks. It has been very helpful. Since I have the related questions, I decided to post it here. This is the first time I am posting here, thus please indicate if for some reason it is inconvenient to post here.

                              Currently, I am working on my master thesis, the impact of the Russian Embargo on Georgia's (republic) exports. I have a single country (Georgia in this case) as an exporter, 76 destination countries, 1141 commodities (HS4 level) and time span between 2000-2018. There are substantial zeros in my trade matrix. Therefore, as suggested by your paper, I am using PPML approach.
                              I also include the year, country(destination), product fixed effects in my model.

                              1. Firstly I have run a regression with Poisson command in Stata including all fixed effects as dummies, however, after waiting for a long time (Ten hours) it did not end. Does this automatically mean that it did not converge? Without included the product fixed effects, I obtained the results. I also tried to rescale the numbers, but it did not work. Is it possible that so many product dummies cause the command to run so long? I also tried to use xtpoisson, but if I choose products to be id variable (I can only have one variable as id, since there are repeated values), then cluster SE are according to products and I can't change it. As far as I am concerned I cant indicate different clustering when I run xtpoisson.

                              2. Now I am using ppml command with the mentioned fixed effects, clustering on country level. However, after 4 hours, I could not get the SE of the coefficients, even though I can see the estimates. My code was the following: eststo model1: ppml export dep.var1 dep.var2 dep.var2 year_* HS4_* country1_*, cluster (country1). Note that all my dependent variables are dummies. 0 regressors were dropped after it finished. I know that my explanation here is not very detailed, but are there any possible suggestions? I have tried the simple reg and it works, I mean I obtained SE.

                              3. The third question is more about econometrics. Which cluster SE should I use in this case, probably cluster(country), correct?

                              I am sorry for having so many questions.

                              Once again, I am very happy that I found this forum. Your answers have been super helpful.

                              If you have already answered similar questions, please indicate the link. No need to answer again.

                              Best Regards,

                              Avto
                              Last edited by Avtandil Abashishvili; 07 Jun 2019, 10:56.

                              Comment


                              • Dear Avto,

                                I suggest that you use the new command ppmlhdfe, it should solve most of your problems. As for standard errors, clstering by country is probably the standard in this context.

                                Best wishes,

                                Joao

                                Comment

                                Working...
                                X