Ever since humans have had the possibility to erect barriers to trade
it has been obvious that doing so is a bad idea. More reasonable
individuals such as the Romans and the Mongols have acknowledged that
and built large free trade areas which allowed economies to flourish.
Unfortunately traditional communities at the edge of the civilized world
still struggle to incorporate this insight into their respective bodies
politic. A very recent example are Britons, a tribe inhabiting a set of
cold and rainy islands off the coast of Europe, who in an act of
collective self-harm decided to go against established economic thinking
and left the European Union.
I want to test whether or not being in a trade block that allows free
movement of goods and services has an effect of GDP growth by comparing
growth rates of European countries inside and outside of the European
Union and its predecessors. The only trading blocks I acknowledge are
the Belgium-Luxembourg Union of 1922, which together with the
Netherlands formed the BENELUX in 1944. BENELUX plus Germany, France and
Italy formed the EEC in 1957, which was expanded in 1973 by adding
Denmark, Ireland and the United Kingdom. Greece joined in 1981 and Spain
and Portugal did so in 1986. Austria, Finland ans Sweden joined in 1995.
The so-called Eastern expansion of 2004 encompassed Cyprus, the Czech
Republic, Estonia, Hungary, Lithuania, Latvia, Malta, Poland, Slovakia
and Slovenia. Bulgaria and Romania joined in 2007 and Croatia did the
same in 2013.
I am using the data set from the Maddison Project (https://www.kaggle.com/datasets/mathurinache/maddison-project-dataset-2020-raw),
which tracks (and estimates) GDP per person. I treat population size as
exogenous, constant and equal for every country under investigation. All
three assumptions are clearly wrong, but I shall sacrifice scientific
integrity on the altar of my laziness. The United Kingdom left the
European Union in 2020, but since the observation period ends in 2018
Brexit is not reflected in the data.
The hypothesis tested here is that being part of the single market has a
(positive) effect on GDP growth. Even though I assume the effect is
positive I use a test that is two-sided, a testing whether the true
difference in means is not equal to 0.
Import data
setwd("C:/Users/43660/Downloads/Maddison")
data <- read.csv("Maddison Project Dataset 2020 Raw.csv")
head(data)
## countrycode country year gdppc pop
## 1 AFG Afghanistan 1820 3 280
## 2 AFG Afghanistan 1870 4 207
## 3 AFG Afghanistan 1913 5 730
## 4 AFG Afghanistan 1950 1 156 8 150
## 5 AFG Afghanistan 1951 1 170 8 284
## 6 AFG Afghanistan 1952 1 189 8 425
I am only interested in European countries
subset_data <-
data[data$country %in% c("Albania", "Austria", "Belgium", "Bulgaria", "Bosnia and Herzegovina", "Belarus", "Switzerland", "Cyprus", "Czech Republic", "Germany", "Denmark", "Spain", "Estonia", "Finland", "France", "United Kingdom", "Georgia", "Greece", "Croatia", "Hungary", "Ireland", "Iceland", "Italy", "Lithuania", "Luxembourg", "Latvia", "Republic of Moldova", "TFYR of Macedonia", "Malta", "Montenegro", "Netherlands", "Norway", "Poland", "Portugal", "Romania", "Russian Federation", "Serbia", "Slovakia", "Slovenia", "Sweden", "Turkey", "Ukraine"
),]
# unique(subset_data$country)
I discard all data before 1900, since before 1922 all countries are
in the “outside”-group (not in the single market) the “inside”-group is
empty, therefore data predating the Luxembourg-Belgium union is not
interesting. I calculate GDP growth by comparing every data point with
the data point preceding and then caculating what growth per year would
be necessary to get the data observed. If not every year corresponds to
a GDP-data point this can cause problems, I therefore keep data not just
starting in 1921, but keep a cushion to make sure that there are data
points to compare the observed data points with.
I also remove missing rows.
subset_data <- subset_data[subset_data$year >= 1900,]
head(subset_data)
## countrycode country year gdppc pop
## 151 ALB Albania 1900 1 092 800
## 152 ALB Albania 1910 1 243 874
## 153 ALB Albania 1913 1 293 898
## 154 ALB Albania 1920 932
## 155 ALB Albania 1921 937
## 156 ALB Albania 1922 942
subset_data <- subset_data[subset_data$gdppc > 0,]
head(subset_data)
## countrycode country year gdppc pop
## 151 ALB Albania 1900 1 092 800
## 152 ALB Albania 1910 1 243 874
## 153 ALB Albania 1913 1 293 898
## 163 ALB Albania 1929 1 476 977
## 184 ALB Albania 1950 1 596 1 227
## 185 ALB Albania 1951 1 666 1 254
I remove the column representing “population” because, as mentioned before, I cannot be bothered to deal with it.
subset_data <- subset_data[,!(names(subset_data) == "pop")]
tail(subset_data)
## countrycode country year gdppc
## 20368 UKR Ukraine 2013 10 404
## 20369 UKR Ukraine 2014 9 818
## 20370 UKR Ukraine 2015 8 961
## 20371 UKR Ukraine 2016 9 214
## 20372 UKR Ukraine 2017 9 484
## 20373 UKR Ukraine 2018 9 813
I now add a column which shows whether in a given year the country in question was part of the single market as defined before.
subset_data$regional_integration <- NA
subset_data$regional_integration[subset_data$country %in% c("Belgium", "Luxembourg")] <- 1922 # UEBL
subset_data$regional_integration[subset_data$country %in% c("Netherlands")] <- 1944 # BENELUX
subset_data$regional_integration[subset_data$country %in% c("Germany", "France", "Italy")] <- 1957 # EEC
subset_data$regional_integration[subset_data$country %in% c("Denmark", "Ireland", "United Kingdom")] <- 1973 # 1st enlargement
subset_data$regional_integration[subset_data$country %in% c("Greece")] <- 1981 # Greece joins
subset_data$regional_integration[subset_data$country %in% c("Greece")] <- 1986 # Spain and Portugal become members
subset_data$regional_integration[subset_data$country %in% c("Austria", "Finland", "Sweden")] <- 1995 # The fourth enlargement
subset_data$regional_integration[subset_data$country %in% c("Cyprus", "Czech Republic", "Estonia", "Hungary", "Lithuania", "Latvia", "Malta", "Poland", "Slovakia", "Slovenia")] <- 2004 # eastern expansion
subset_data$regional_integration[subset_data$country %in% c("Bulgaria", "Romania")] <- 2007 # Bulgaria and Romania
subset_data$regional_integration[subset_data$country %in% c("Croatia")] <- 2013 # Croatia
subset_data[subset_data$country == "Luxembourg" & subset_data$year < 1956, ]
## countrycode country year gdppc regional_integration
## 11754 LUX Luxembourg 1950 13 378 1922
## 11755 LUX Luxembourg 1951 12 337 1922
## 11756 LUX Luxembourg 1952 13 162 1922
## 11757 LUX Luxembourg 1953 13 256 1922
## 11758 LUX Luxembourg 1954 13 238 1922
## 11759 LUX Luxembourg 1955 13 818 1922
The data in the gross domestic product per capita column is a string and in order to perform calculations on the data it must be converted.
subset_data$gdppc <- gsub("[^0-9.]", "", subset_data$gdppc)
subset_data$gdppc <- as.numeric(subset_data$gdppc)
subset_data[subset_data$country == "Belgium" & subset_data$year < 1906, ]
## countrycode country year gdppc regional_integration
## 1175 BEL Belgium 1900 5947 1922
## 1176 BEL Belgium 1901 5928 1922
## 1177 BEL Belgium 1902 5960 1922
## 1178 BEL Belgium 1903 6013 1922
## 1179 BEL Belgium 1904 6091 1922
## 1180 BEL Belgium 1905 6188 1922
I create a vector with all the alculated year-on-year GDP growth rates inside the common market and another one for the corresponding values outside the common market. Then I perform a two sample t-test to see whether the the average growth rates outside and inside were the same.
mean_outside <- c()
mean_inside <- c()
for (start in seq(1900, 2010, by = 10)) {
subset_data <- subset_data[subset_data$year > start,]
growth_outside <- c()
growth_inside <- c()
old_row <- subset_data[nrow(subset_data), ]
for (i in 1:nrow(subset_data)) {
new_row <- subset_data[i, ]
if (old_row$year < new_row$year) {
if (is.na(new_row$regional_integration) || new_row$year < new_row$regional_integration
) {
growth_outside <- c(growth_outside, rep(((new_row$gdppc - old_row$gdppc)/old_row$gdppc) ^ (1 / (new_row$year - old_row$year)), new_row$year - old_row$year)
)
}
else{
growth_inside <- c(growth_inside, rep(((new_row$gdppc - old_row$gdppc)/old_row$gdppc) ^ (1 / (new_row$year - old_row$year)), new_row$year - old_row$year)
)
}
}
old_row <- new_row
}
cat("\n------------------------------------------------------------------\n \n")
growth_outside <- growth_outside[!is.nan(growth_outside)]
growth_inside <- growth_inside[!is.nan(growth_inside)]
estimate_outside <- t.test(growth_outside, growth_inside)$estimate[1]
estimate_inside <- t.test(growth_outside, growth_inside)$estimate[2]
mean_outside <- c(mean_outside, 100 * estimate_outside)
mean_inside <- c(mean_inside, 100 * estimate_inside)
if (estimate_outside > estimate_inside){
winners <- "outside the single market"
} else {
winners <- "in the single market"
}
chance <- 1/t.test(growth_outside, growth_inside)$p.value
print(paste("Over the period from", start, "to 2018 the mean growth rate inside the single market is roughly", round(100 * estimate_inside, 2), "% compared with", round(100 * estimate_outside, 2),"% for the countries outside. The countries", winners, "grew more strongly. The likelihood of this being due to pure chance is 1 :", round(chance)))
}
##
## ------------------------------------------------------------------
##
## [1] "Over the period from 1900 to 2018 the mean growth rate inside the single market is roughly 2.48 % compared with 5.9 % for the countries outside. The countries outside the single market grew more strongly. The likelihood of this being due to pure chance is 1 : 2.23347851804841e+21"
##
## ------------------------------------------------------------------
##
## [1] "Over the period from 1910 to 2018 the mean growth rate inside the single market is roughly 2.48 % compared with 5.97 % for the countries outside. The countries outside the single market grew more strongly. The likelihood of this being due to pure chance is 1 : 2.67050274939285e+20"
##
## ------------------------------------------------------------------
##
## [1] "Over the period from 1920 to 2018 the mean growth rate inside the single market is roughly 2.48 % compared with 5.1 % for the countries outside. The countries outside the single market grew more strongly. The likelihood of this being due to pure chance is 1 : 181055838214328"
##
## ------------------------------------------------------------------
##
## [1] "Over the period from 1930 to 2018 the mean growth rate inside the single market is roughly 2.49 % compared with 4.45 % for the countries outside. The countries outside the single market grew more strongly. The likelihood of this being due to pure chance is 1 : 3370716048"
##
## ------------------------------------------------------------------
##
## [1] "Over the period from 1940 to 2018 the mean growth rate inside the single market is roughly 2.53 % compared with 4.79 % for the countries outside. The countries outside the single market grew more strongly. The likelihood of this being due to pure chance is 1 : 100550120315"
##
## ------------------------------------------------------------------
##
## [1] "Over the period from 1950 to 2018 the mean growth rate inside the single market is roughly 2.48 % compared with 4.84 % for the countries outside. The countries outside the single market grew more strongly. The likelihood of this being due to pure chance is 1 : 9551178800968"
##
## ------------------------------------------------------------------
##
## [1] "Over the period from 1960 to 2018 the mean growth rate inside the single market is roughly 2.42 % compared with 4.9 % for the countries outside. The countries outside the single market grew more strongly. The likelihood of this being due to pure chance is 1 : 118105028221"
##
## ------------------------------------------------------------------
##
## [1] "Over the period from 1970 to 2018 the mean growth rate inside the single market is roughly 2.3 % compared with 4.92 % for the countries outside. The countries outside the single market grew more strongly. The likelihood of this being due to pure chance is 1 : 655345018"
##
## ------------------------------------------------------------------
##
## [1] "Over the period from 1980 to 2018 the mean growth rate inside the single market is roughly 2.31 % compared with 1.9 % for the countries outside. The countries in the single market grew more strongly. The likelihood of this being due to pure chance is 1 : 10"
##
## ------------------------------------------------------------------
##
## [1] "Over the period from 1990 to 2018 the mean growth rate inside the single market is roughly 2.29 % compared with 2.72 % for the countries outside. The countries outside the single market grew more strongly. The likelihood of this being due to pure chance is 1 : 5"
##
## ------------------------------------------------------------------
##
## [1] "Over the period from 2000 to 2018 the mean growth rate inside the single market is roughly 2.03 % compared with 3.68 % for the countries outside. The countries outside the single market grew more strongly. The likelihood of this being due to pure chance is 1 : 33669134"
##
## ------------------------------------------------------------------
##
## [1] "Over the period from 2010 to 2018 the mean growth rate inside the single market is roughly 1.82 % compared with 1.69 % for the countries outside. The countries in the single market grew more strongly. The likelihood of this being due to pure chance is 1 : 1"
The test shows us that whether the growth rate inside or outside the single market was higher depends on the observed time frame. That makes a lot of sense, since both theory and empirical observation suggest that GDP per capita was most unequal roughly 200 years ago and has been converging ever since. The countries “inside” and “outside” differ wildly in their initial conditions. Before the first World War Belgium was one of the world’s richest regions. Even after World War II the countries that would form the nucleus of the European Union were vastly more developed than some of the countries that are outside of the EU to this day. The statistical analysis suggests that the catch-up effect benefiting the poorest countries in the sample outweighs the positive effect of being a member of the single market, that some of the richest countries enjoy.
The following plot shows how the results change, depending on the point in time where we beging our observations.
plot(seq(1900, 2010, by = 10), mean_outside, type = "p", col = "blue", xlab = "Start of Observation", ylab = "Mean Growth Rate", main = "Mean Growth Rates from Different Points in Time to the Present Day")
points(seq(1900, 2010, by = 10), mean_inside, type = "p", col = "red")
legend("topright", legend = c("Mean Outside", "Mean Inside"), col = c("blue", "red"), pch = 1)
Using different rationalizations one could remove countries like Albania, Russia or Switzerland from the data set. Adjusting weights, so that more populous countries have larger weight in the data set could also be justified. Ultimately it is not clear where “cleaning of data” turns into “massaging of data” and ultimately outright fraud. Therefore I prefer to admit that I failed to produce the expected result. I conclude that the design chosen is not fit for purpose, the “noise” is stronger than the “signal”.