library(AER) data(CollegeDistance) wage_mod_1 <- lm(log(wage) ~ education, data = CollegeDistance) wage_mod_2 <- lm(log(wage) ~ unemp + ethnicity + gender + urban + education, data = CollegeDistance) wage_mod_iv1 <- ivreg(log(wage) ~ education | distance, data = CollegeDistance) wage_mod_iv2 <- ivreg(log(wage) ~ unemp + ethnicity + gender + urban + education | . - education + distance, data = CollegeDistance) # all model objects from the previous exercises are available in the global environment