Importing the data
# Import starting data
nlsy <- read.csv("http://www.andrew.cmu.edu/user/achoulde/94842/final_project/nlsy97_income/nlsy97new_income.csv", header=TRUE)
colnames(nlsy) <- c("INCARC_TOTNUM_XRND",
"INCARC_AGE_FIRST_XRND",
"INCARC_LENGTH_LONGEST_XRND",
"PUBID_1997",
"YSCH-36400_1997",
"YSCH-37000_1997",
"YSAQ-010_1997",
"YEXP-300_1997",
"YEXP-1500_1997",
"YEXP-1600_1997",
"YEXP-1800_1997",
"YEXP-2000_1997",
"KEY_SEX_1997",
"KEY_BDATE_M_1997",
"KEY_BDATE_Y_1997",
"PC9-002_1997",
"PC12-024_1997",
"PC12-028_1997",
"CV_BIO_MOM_AGE_CHILD1_1997",
"CV_BIO_MOM_AGE_YOUTH_1997",
"CV_ENROLLSTAT_1997",
"CV_HH_NET_WORTH_P_1997",
"CV_SAMPLE_TYPE_1997",
"CV_HGC_RES_DAD_1997",
"CV_HGC_RES_MOM_1997",
"KEY_RACE_ETHNICITY_1997",
"FP_YMFRELAT_1997",
"FP_YFMRELAT_1997",
"YSCH-6800_1998",
"YSCH-7300_1998",
"YSAQ-372B_1998",
"FP_YMFRELAT_1998",
"FP_YFMRELAT_1998",
"YSAQ-371_2000",
"YSAQ-282J_2002",
"YSAQ-282Q_2002",
"CV_HH_NET_WORTH_Y_2003",
"CV_BIO_CHILD_HH_2003",
"YSAQ-000B_2004",
"YSAQ-373_2004",
"YSAQ2-292_2005",
"YTEL-52~000001_2007",
"YTEL-52~000002_2007",
"YTEL-52~000003_2007",
"YTEL-52~000004_2007",
"CV_BIO_CHILD_HH_2010",
"CV_COLLEGE_TYPE.01_2011",
"CV_INCOME_FAMILY_2011",
"CV_HH_SIZE_2011",
"CV_HH_UNDER_18_2011",
"CV_HH_UNDER_6_2011",
"CV_HIGHEST_DEGREE_1112_2011",
"YSCH-3112_2011",
"YSAQ-000A000001_2011",
"YSAQ-000A000002_2011",
"YSAQ-000B_2011",
"YSAQ-360C_2011",
"YSAQ-364D_2011",
"YSAQ-371_2011",
"YSAQ-372CC_2011",
"YSAQ-373_2011",
"YSAQ-374_2011",
"YHEA29-285_2011",
"YEMP_INDCODE-2002.01_2011",
"VERSION_R16_2013",
"YINC-1400_2013",
"YINC-1700_2013",
"YINC-1800_2013",
"YINC-2400_2013",
"YINC-2600_2013",
"YINC-2700_2013",
"YEMP_INDCODE-2002.01_2013",
"YEMP_OCCODE-2002.01_2013",
"CVC_SAT_MATH_SCORE_2007_XRND",
"CVC_SAT_VERBAL_SCORE_2007_XRND",
"CVC_ACT_SCORE_2007_XRND",
"CVC_ASSETS_DEBTS_20_XRND",
"CVC_TTL_JOB_TEEN_XRND",
"CVC_TTL_JOB_ADULT_ET_XRND",
"CVC_TTL_JOB_ADULT_ALL_XRND",
"CVC_ASSETS_DEBTS_30_XRND")