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
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
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 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
Comment