use "C:\Users\Asus\Documents\AUCA\Teaching\2022-2023\Econometrics I\Seminars\Seminar 9\Card.dta" regress educ nearc4 exper expersq black smsa south reg662 reg663 reg664 reg665 reg666 reg667 reg668 reg669 predict v2, residuals regress lwage educ exper expersq black smsa south reg662 reg663 reg664 reg665 reg666 reg667 reg668 reg669 v2 ivregress 2sls lwage exper expersq black smsa south reg662 reg663 reg664 reg665 reg666 reg667 reg668 reg669 (educ = nearc4 nearc2) predict u1hat, residuals regress u1hat nearc4 nearc2 exper expersq black smsa south reg662 reg663 reg664 reg665 reg666 reg667 reg668 reg669 use "C:\Users\Asus\Documents\AUCA\Teaching\2022-2023\Econometrics I\Seminars\Seminar 9\wage2.dta", clear ivregress 2sls lwage exper tenure black (educ = sibs) regress educ sibs exper tenure black predict educ_hat regress lwage educ_hat exper tenure black regress educ sibs predict educ_tilde regress lwage educ_tilde exper tenure black use "C:\Users\Asus\Documents\AUCA\Teaching\2022-2023\Econometrics I\Seminars\Seminar 9\htv.dta", clear regress lwage educ regress educ ctuit regress lwage educ expersq ne west south ne18 south18 west18 urban urban18 regress educ ctuit expersq ne west south ne18 south18 west18 urban urban18 ivregress 2sls lwage expersq ne west south ne18 south18 west18 urban urban18 (educ = ctuit)