# NOT RUN {
## load data
data("SchoolingReturns", package = "ivreg")
## Table 5.1 in Verbeek (2004) / Table 2(1) in Card (1995)
## Returns to education: 7.4%
m_ols <- lm(log(wage) ~ education + poly(experience, 2, raw = TRUE) + ethnicity + smsa + south,
data = SchoolingReturns)
summary(m_ols)
## Table 5.2 in Verbeek (2004) / similar to Table 3(1) in Card (1995)
m_red <- lm(education ~ poly(age, 2, raw = TRUE) + ethnicity + smsa + south + nearcollege,
data = SchoolingReturns)
summary(m_red)
## Table 5.3 in Verbeek (2004) / similar to Table 3(5) in Card (1995)
## Returns to education: 13.3%
m_iv <- ivreg(log(wage) ~ education + poly(experience, 2, raw = TRUE) + ethnicity + smsa + south |
poly(age, 2, raw = TRUE) + ethnicity + smsa + south + nearcollege,
data = SchoolingReturns)
summary(m_iv)
# }
Run the code above in your browser using DataLab