---
title: "Convergence"
subtitle: 16MA4b
author: "Kenji Sato <mail@kenjisato.jp>"
output:
  pdf_document: default
  html_notebook: default
  html_document: default
bibliography: ../bibliography.bib
---
# Summary

According to the Solow model, poor countries grow more rapidly if they have the same production function and parameters as rich countries. As a quick excercise we reproduce Figures 3.5 and 3.6 in @JonesVollrath2013, a figure similar to Figure 1.7 in @Romer4e.


# Code

```{r}
library(dplyr)
library(tidyr)
library(ggplot2)
library(readstata13)
```

Import Penn World Table dataset (See @PWT):

```{r}
pwt = read.dta13("../pwt90.dta")
```

The following vector contains the list of the OECD countries.


```{r}
oecd = c("Switzerland",
            "Australia",
            "Austria",
            "Belgium",
            "Canada",
            "Chile",
            "Czech Republic",
            "Denmark",
            "Estonia",
            "Finland",
            "France",
            "Germany",
            "Greece",
            "Hungary",
            "Iceland",
            "Ireland",
            "Israel",
            "Italy",
            "Japan",
            "Republic of Korea",
            "Latvia",
            "Luxembourg",
            "Mexico",
            "Netherlands",
            "New Zealand",
            "Norway",
            "Poland",
            "Portugal",
            "Slovakia",
            "Slovenia",
            "Spain",
            "Sweden",
            "Switzerland",
            "Turkey",
            "United Kingdom",
            "United States")
```

Select important columns and reshape, calculate GDP per Worker. Add information about OECD membership.

```{r}
df.world <- pwt %>%
  select(country, countrycode, year, rgdpo, emp) %>%
  filter(year==1960 | year==2010) %>% 
  mutate(gdp_per_worker = rgdpo / emp) %>%
  select(-rgdpo, -emp) %>%
  spread(year, gdp_per_worker) %>%
  mutate(avg.growth = (`2010` / `1960`)^(1/(2010-1960)) - 1,
         oecd = (country %in% oecd))

head(df.world)
```

### OECD Countries

```{r}
df.oecd = df.world %>% filter(oecd==TRUE)
mod.oecd = lm(avg.growth ~ `1960`, data = df.oecd)

summary(mod.oecd)
```

```{r}
df.world %>% 
  filter(oecd==TRUE) %>%
  ggplot(aes(x=`1960`, y=avg.growth)) + 
    geom_text(aes(label=countrycode)) + 
    geom_smooth(method='lm') + 
    labs(x="GDP per worker, 1960", y="Growth rate, 1960-2010", 
         title="Convergence in the OECD, 1960-2010")
```

### Entire world

```{r}
mod.world = lm(avg.growth ~ `1960`, data = df.world)

summary(mod.world)
```

The negative slope is no longer statistically significant.

```{r}
df.world %>% 
  ggplot(aes(x=`1960`, y=avg.growth)) + 
    geom_text(aes(label=countrycode)) + 
    geom_smooth(method="lm") + 
    labs(x="GDP per worker, 1960", y="Growth rate, 1960-2010", 
         title="Lack of convergence for the world, 1960-2010")
```

# Excercises

## Excercise 1. Play more with the data

Look at the data in PWT for any one country of your choice and find parameter values for the Solow model. Perform a simulation with those estimated parameters. (See [16MA4a])

## Excercise 2. Maddison Project Dataset

Download the historical data of Maddison Project Dataset from http://www.ggdc.net/maddison/maddison-project/home.htm. Reproduce Figures 1.7 and 1.8 of @Romer4e with more up-to-date estimates. Do you still observe convergence and lack of convergence?


# References


