Announcement

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

  • GE_gravity: a new stata module for general equilibrium trade policy analysis

    Dear Stata users,
    Based on some of the topics of discussion that tend to come up frequently on this forum, it's become apparent to me that there is a large number of people using Stata for some sort of trade policy analysis. Typically, I'm used to fielding questions about the application of Poisson PML estimation to so-called "structural gravity" models of trade. However, thanks to contributions such as the recent Advanced Guide to Trade Policy Analysis put out by the WTO and UNCTAD, it is becoming increasingly well known that empirical trade policy analysis using the structural gravity model can be easily extended to a general equilibrium setting, such that "partial" gravity estimates of trade agreements, tariff changes, and other changes in trade policy conditions can be mapped to changes in national welfare, trade diversion, and many other related general equilibrium objects that may be of interest. As such, GE simulations based on structural gravity are becoming an increasingly common component of modern trade policy analysis.

    Interestingly, while there are some excellent commands available in Stata for estimating gravity equations, there have not been until now any dedicated Stata modules available for performing GE welfare analysis post-estimation. To that end, I have decided to share a new Stata command called GE_gravity, which can be used to perform a simple general equilibrium trade policy analysis based on a one-sector general equilibrium trade model (such as the models used in, e.g., Eaton and Kortum 2002 or Anderson and van Wincoop, 2003). For those not already familiar with this type of analysis, there is an online help file that clarifies the details behind the model and provides some standard references on the subject. The algorithm itself is a slightly streamlined version of some earlier code shared by Keith Head and Thierry Mayer. It is programmed to run in Mata, so it is quite fast in typical applications. I envision it being ideal for situations where a researcher wants to quickly construct bootstrapped confidence intervals of changes in general equilibrium variables based on prior gravity estimates (as opposed to, say, obtaining bootstrapped gravity estimates in Stata first and then passing them to MATLAB for the GE analysis.)

    If you decide to use this command in your research, I would appreciate it if you would cite
    • Baier, Scott L., Yoto V. Yotov, and Thomas Zylkin. “On the widely differing effects of free trade agreements: Lessons from twenty years of trade integration." Journal of International Economics 116 (2019): 206-226.
    The algorithm used in the command was specifically written for the exercises performed in this paper. Also see Section 6 of the paper for a more detailed description of the underlying model and its connection to the wider literature.

    The command is available for download via ssc: to obtain the latest version, type "ssc install GE_gravity, replace". There is also an example .do file and data set you can use to learn the syntax and options.

    If you have any suggestions or run into any errors, please feel free to get in touch. I hope the community finds this command useful.

    Regards,
    Tom
    Last edited by Tom Zylkin; 08 Aug 2019, 12:43.

  • #2
    Dear Dr Zylkin,

    This is an excellent contribution!

    Currently, I am working on a GE welfare analysis using Eaton and Kortum (2002), and I am finally gravitating towards the post-estimation part. Although I have not looked deep enough into the codes and files you share, I am happy to see you mentioned EK (2002). Hopefully I am able to consult you as I estimate my model.

    Thanks,

    Noé

    Comment


    • #3
      Hi Noé,

      Yes absolutely. In terms of Eaton-Kortum vs. Armington, there is nothing in particular that is different in terms of how to solve the model. Indeed, if you look at the notation in the help file, it closely follows Eaton-Kortum. The only difference is that, in Eaton Kortum, the price index should be multiplied by a constant, ie the constant that appears in equation (9) in their paper. However, this term plays no role in solving the model or in interpreting the results.

      If you have any questions, please let me know.

      Regards,
      Tom

      Comment


      • #4
        Dear Dr Zylkin,

        This morning, I dedicated some time to explore your new Stata command. I found that it does not fit my purpose. While it seems extremely useful to model changes in welfare caused by, for instance, more countries entering or exiting a trade agreement, my counterfactual aims to simulate changes in technology such as those in Eaton-Kortum page (1771) and changes in geographical barriers such as those in EK page (1768). Am I correct to assume that your command does not fit my purposes? If not, would you advise me how to proceed? Any recommendations?

        Thanks,

        Noé

        Comment


        • #5
          Hi Noé,
          That's right that the command currently does not allow for changes in technology parameters. However, this is a very easy and feasible extension. Please email me about this and I will get back to you.

          For geographic barriers, these are isomophic to changes in trade costs due to trade agreements, so the command can model them perfectly fine.

          Regards,
          Tom

          Comment


          • #6
            Dear Tom,

            I’m currently working on an ex-ante FTA analysis and wanted to ask if the Stata code for Section 6 'Out-of-sample predictions & ex ante analysis' of your article, “On the Widely Differing Effects of Free Trade Agreements: Lessons from Twenty Years of Trade Integration,” is available. Specifically, I’m interested in how you predicted the direction-pair-specific partial effects of TTIP (Table 6), as well as your overall approach to the ex-ante analysis for TTIP.

            Any guidance you could provide (and code you can share) would be greatly appreciated.

            Many thanks and best regards,
            Andrea

            Comment


            • #7
              Originally posted by Andrea Henrikson View Post
              Dear Tom,

              I’m currently working on an ex-ante FTA analysis and wanted to ask if the Stata code for Section 6 'Out-of-sample predictions & ex ante analysis' of your article, “On the Widely Differing Effects of Free Trade Agreements: Lessons from Twenty Years of Trade Integration,” is available. Specifically, I’m interested in how you predicted the direction-pair-specific partial effects of TTIP (Table 6), as well as your overall approach to the ex-ante analysis for TTIP.

              Any guidance you could provide (and code you can share) would be greatly appreciated.

              Many thanks and best regards,
              Andrea
              Hi Andrea,
              Yes that code is available with our replication materials. They can be found on the journal website, or you can email me.
              Regards,
              Tom

              Comment

              Working...
              X