![]() This Matlab script calculates all numbers reported in Section III on multi-product and multi-country exporting firms. Make sure to run read_gravity_data.do and SectionIIa_d.do first. This Matlab script calculates firm-level zeroes in the model, using the trade shares calculated above and the gravity-related variables. If you have Stata 10 or older, you should change the merge commands to the old syntax. If you have Stata 11, you may want to assign a large-enough amount of memory at the beginning. It assumes you are running Stata 12 or higher. export data from data/census/export_detl.csv, gravity variables from data/gravity/gravity_variables.dta (make sure to run read_gravity_data.do first) and replicates all the numbers, tables and figures reported in Sections II.A through II.D in the paper. ![]() It saves these gravity variables in data/gravity/gravity_variables.dta to be used for analysis by the Stata script below and in data/gravity/gravity_variables.csv to be used for analysis by Matlab. Using data from the Penn World Table, World Development Indicators, and the GeoDist data of CEPII, this Stata do-file compiles the necessary variables for a gravity equation for all the countries in the Census trade data. We have included a makefile ( Makefile for Linux and Mac OS X and make.bat for Windows) that calls all necessary programs in the required order. ![]() CodeĪll programs are under the folder code. Please cite the above paper when using these programs. "A Balls-and-Bins Model of Trade." American Economic Review. Replication data and programs for Armenter, Roc and Miklós Koren. Replication data and programs for "A Balls-and-Bins Model of Trade"
0 Comments
Leave a Reply. |