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).
data(Gravity)
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 or zero trade flows are therefore excluded from the dataset.
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,]
# Exclusion of trade flows equal to 0
Gravity <- data06[data06$flow != 0,]
row.names(Gravity) <- 1:length(row.names(Gravity))
# Divide GDPs by 1,000,000 for scaling purposes
Gravity$gdp_o <- Gravity$gdp_o / 1000000
Gravity$gdp_d <- Gravity$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).