Announcement

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

  • Gravity Model International Trade

    I am trying to estimate the gravity model of international trade using Fixed Effect Model. I have data from 1970-75-80-85-90-95-2000-05-10. I used the code

    xtset pairid year where pairid is the alphanumeric pairid for each trading partners. Then, I used reg xtreg ln(Trade) ln(Dist) ln(ImpGDP) ln(ExpGDP) i.year, fe.

    In the result, ln(Dist) was removed due to collinearity issue. I am actually interested in this particular coefficient but stata is omitting it. Is there something that I did wrong?


  • #2
    Click image for larger version

Name:	1.PNG
Views:	1
Size:	7.1 KB
ID:	1605571

    This is what I got

    Comment


    • #3
      Distance is time-invariant within pairs (I assume your data doesn't account for tectonic plate shifts) and therefore perfectly collinear with the pair fixed effects. A random-effects or between-effects model will not omit the distance variable, but whether that's a plausible approach in your case is a question for which you'll have to consult the pertinent literature.

      Comment


      • #4
        Is there any ways I can use country pair fixed effect and still retain the distance coefficient?

        Comment


        • #5
          The point of a fixed effects model is that it controls for time-invariant (fixed) effects within panels. Since distance is time-invariant within panels, it is ostensibly already controlled for by the fixed effects and Stata won't allow you to include it as a regressor because of collinearity. See reply #4 of this post (https://www.statalist.org/forums/for...iant-variables) for a lengthy list of past discussions on the same subject.

          Comment


          • #6
            Dear Prashant Bhandari,

            Ali already provided a lot of useful information, but let me try to add to it. Typically, gravity equations include the so-called origin and destination fixed effects, not pair fixed effects. With the origin and destination dummies (varying by year), the variables that are dropped are the characteristics of each country (GDP, population, etc) but characteristics of the pair such as distance are retained. So, you may want to use this approach. Furthermore, you may want to estimate your model by PPML rather than by OLS; among other important advantages, that allows you to retain the observations for pairs that have zero trade. Check out the used contributed ppmlhdfe that allows the use of fixed effects and is very fast.

            Best wishes,

            Joao

            Comment


            • #7
              Dear Joao Santos Silva , thank you for your response. I was knew to the fixed effect approach and now I have understood it better. I used importer time and exporter time fixed effects to estimate equation for the period 1975-90 and 1995-2010. Do you think using importer time and exporter time fixed effects are helpful if my research question is how the coefficient of distance has changed over time? And yes, I have been trying to learn PPML estimation. Thank you for the suggestion.

              Comment


              • #8
                Indeed, I think that is the correct approach.

                Best wishes,

                Joao

                Comment


                • #9
                  Dear Joao Santos Silva I`m working in a gravity equation where my dependent variable is the FDI from Chile to other countries (I included all countries, so I have several zero values), my variable of interest is treaty (dummy which takes the value 1 if Chile and the country have a double taxation agreement). I have information from 2006 to 2019. To estimate my panel I did the following:

                  xtset id year

                  xtpoisson fdi treaty ln(independent variables) dummy(dummy variables), fe

                  My questions are:

                  1) In the forum I saw that some people included a dummy for year in the regression, is that necessary if previously I put "xtset id year"
                  2) I need to include vce (robust)

                  Thank you!!!

                  Comment


                  • #10
                    Dear Dani Rojas,

                    1) You are the one who has to choose the specification of the model,
                    2) yes.

                    Best wishes,

                    Joao

                    Comment


                    • #11
                      Thank you very much for your help Joao Santos Silva!!!

                      Best regards

                      Comment


                      • #12
                        Hi

                        I am working on a gravity model specification incorporating the effect of Covid on Japanese trade. My dataset is a bilateral trade panel with monthly data in 2020, including imports to Japan, and a bilateral Covid intensity measure, as in the following toy data.
                        period_t origin_i destination_j tradevalue_ijt Covid intensity_ijt
                        01 2020 B A 550 70
                        01 2020 C A 610 80
                        01 2020 D A 700 60
                        02 2020 B A 610 60
                        02 2020 C A 510 75
                        02 2020 D A 500 20

                        I ran the following code in Stata with fixed effects according to the structural gravity equation:
                        Code:
                        egen fe1=group(origin destination)
                        egen fe2=group(destination period)
                        egen fe3=group(origin period)
                        xi: xtreg log(tradevalue) Covid_int i.fe2 i.fe3, fe i(fe1)
                        However, Stata tells me that there are "insufficient observations". Could someone help me with this?

                        Thank you and best


                        Comment


                        • #13
                          Good day
                          I am contacting you since I would like to know if it is possible for you to help me with my degree work on econometric estimation.

                          I have tried to estimate the gravity model of trade between Colombia and its main trading partners for the period 2009-2019, but I have some doubts:

                          1. I don't know which methodology is better, Poisson regression, OLS, fixed or random effects. It should be noted that with Poisson and OLS all the variables give me significance, but with fixed and random effects, only some.

                          2. Whenever I try to do the test to verify heteroscedasticity with the "hettest" command, it only works for the OLS regression, for the others it appears that the command is not valid or that the last estimators have not been found. It should be noted that I have the latest version of stata with all its packages and I always execute the command after executing the regression
                          3. I work with the CEPPI database, and there the distance that they have in the data does not change, however I have worked with that one. However, I wonder if there is any other way to measure geographic distance in the literature and if it changes over time.

                          Those are some of my questions, I would appreciate it if you could help me since this econometric part is the one that has been the most difficult for me to carry out the work, thank you very much for your attention, I remain attentive to your response.

                          Comment


                          • #14
                            Dear David Zabala,

                            1. Just use PPML with the standard fixed effects as here.
                            2. No need to test for heteroskedasicity; it is there!
                            3. Distance only changes if you consider a geologic time scale. More seriously, it may change if you use some sort of distance weighted by population and the weights change over time, but the standard is to treat distance as not varying over time.

                            Good luck,

                            Joao

                            Comment


                            • #15
                              When I use fixed effects, the dummy variables and the distance variable are omitted. Is the estimation very distorted if I do not include fixed effects?

                              Comment

                              Working...
                              X