Matlab Codes for “General Equilibrium Analysis  of  the Eaton-Kortum  Model  of International  Trade” (with Robert E. Lucas, Jr.)

1) Unzip and Download all the files to a directory.

MatlabCodesTradeStatic

 2) There is a set of readme*.m files with instructions. They are:

readmecal.m,  readmeeq.m,  readmefig.m, readmewgains.m 

They give the instructions to run different programs (calibration, equilibrium, figures in the paper, and welfare gains, respectively) for different variants of the model.

For example, help readmefig.m will give the instructions of the codes to run to create all the figures in the paper.

Typying dataload ; examples ; at the matlab  prompt will produce a table and regressions used in the paper.

Data

The excel files have the raw data on GDP, tariffs, trade volume and trading blocks in spreadsheet form in two different spreadsheets: tradedata.xls and matrixTradingBlocks.xls. The matlab file datatrade.m also has the raw data for Table 2 in ascii format, the file descripdatatrade.m  describe each of its columns. The matlab file blockmatrix.m has the trading blocks in ascii format. The matlab file dmatrix.m has a matrx with the pair-wise distances between the 60 countries.   The files countrycodes.m and longcountrynames.m give the names of each of the 60 countries used in the other files.