Use either the ACS or the NLSY79 to run a regression of log income on education with a set of controls that we have not tried in class.

How do the estimates compare to the regression of log income on only years of education?

Report the results of both the simple regression with no controls and the regression with extra controls in one nicely formatted table using the stargazer function.

## Put your r code here
library(readr)
nlsy <- read_csv("nlsy79.csv")
## Parsed with column specification:
## cols(
##   CASEID = col_double(),
##   race = col_character(),
##   sex = col_character(),
##   earn2009 = col_double(),
##   bmonth = col_double(),
##   byear = col_double(),
##   afqt = col_double(),
##   region_1979 = col_double(),
##   faminc1978 = col_double(),
##   hgc = col_double(),
##   nsibs79 = col_double()
## )
nlsy$svo<-NA
nlsy$svo[nlsy$bmonth==9]<-0
nlsy$svo[nlsy$bmonth==10]<-1
nlsy <- na.omit(nlsy)
nlsy$sexi<-NA
nlsy$sexi[nlsy$sex=="MALE"]<-0
nlsy$sexi[nlsy$sex=="FEMALE"]<-1
glm(earn2009~svo+sexi, data=nlsy)
## 
## Call:  glm(formula = earn2009 ~ svo + sexi, data = nlsy)
## 
## Coefficients:
## (Intercept)          svo         sexi  
##       60451         3484       -25215  
## 
## Degrees of Freedom: 473 Total (i.e. Null);  471 Residual
## Null Deviance:       1.508e+12 
## Residual Deviance: 1.431e+12     AIC: 11700