An edited version of the full gravity dataset: The "square" gravity dataset
for all possible pairs of Countries worldwide, 1948-2006, which is used in
the article: Head, K., T. Mayer and J. Ries, 2010, "The erosion of
colonial linkages after independence". Journal of International Economics,
81(1):1-14 (lead article).
Dataset Gravity_no_zeros
corresponds to the dataset without zero
trade flows, Gravity_zeros
, on the other hand, includes
zero trade flows.
data(Gravity_zeros)
A data frame with 17088 rows and 10 variables:
ISO-Code of country of origin
ISO-Code of country of destination
weighted distance
GDP of country of origin
GDP of country of destination
regional trade agreement
trade flow
contiguity
common official language
common currency
An edited version of the full gravity dataset: The "square" gravity dataset for all possible pairs of Countries worldwide, 1948-2006, which is used in the article: Head, K., T. Mayer and J. Ries, 2010, "The erosion of colonial linkages after independence". Journal of International Economics, 81(1):1-14 (lead article).
In order to have a dataset suited for all functions, a cross-sectional
dataset is chosen. All incomplete rows and observations with missing
trade flows are therefore excluded from the dataset.
As some of the functions in the package are capable of
handling zero values in trade flows and some are not,
two datasets, Gravity_zeros
and Gravity_no_zeros
,
are provided.
The original dataset downloaded at http://econ.sciences-po.fr/sites/default/files/file/tmayer/data/col_regfile09.zip was edited in the following way:
# Reading in the dataset
library(foreign)
col_regfile09 <- read.dta("col_regfile09.dta")
# Isolation of one year
data06 <- col_regfile09[col_regfile09$year == 2006,]
# Choosing variables (select columns)
data06 <- data06[,c(2, 3, 6, 8, 12, 27, 34, 4, 5, 29)]
# Transforming data
# Isolation of complete cases
data06 <- data06[complete.cases(data06) == TRUE,]
Gravity_zeros <- data06
row.names(Gravity_zeros) <- 1:length(row.names(Gravity_zeros))
# Divide GDPs by 1,000,000 for scaling purposes
Gravity_zeros$gdp_o <- Gravity_zeros$gdp_o / 1000000
Gravity_zeros$gdp_d <- Gravity_zeros$gdp_d / 1000000
Head, K. and Mayer, T. (2014). Chapter 3 - gravity equations: Workhorse,toolkit, and cookbook. In Gita Gopinath, E. H. and Rogoff, K., editors, Handbook of International Economics, volume 4 of Handbook of International Economics, pages 131-195. Elsevier. (Gravity Equations: Workhorse, Toolkit, and Cookbook)
Head, K., T. Mayer and J. Ries, 2010, "The erosion od colonial linkages after independence". Journal of International Economics, 81(1):1-14 (lead article).