Description

Here we are reproducing the results from Autor 2003. Figure 3 in page 26.

Loading the raw data

# Download the data and unzip it
download.file('http://economics.mit.edu/~dautor/outsourcingatwill_table7.zip', 
              'outsourcingatwill_table7.zip')
unzip('outsourcingatwill_table7.zip')
# Load the data
autor <- read.dta('table7/autor-jole-2003.dta')

Data cleaning

We restrict our sample to the years 1979 to 1995 inclusive. We also exclude Guam the analysis.

# Restrict sample
autor <- autor[which(autor$year >= 79 & autor$year <= 95), ]
autor <- autor[which(autor$state != 98), ]