* Class 8 Exercise 2014.do clear all prog drop _all capture log close set more off global datadir global logdir log using "$logdir\class8 solution log 2014.smcl", replace use "$datadir\newschools9810.dta", clear * First generate regsq, year98, year02, year06, year10, boromn, borobx, borobk, boroqn, borosi. * See previous exercises or consult help if you forgot how to do this. gen year98 gen year02 gen year06 gen year10 gen regsq gen boromn gen borobx gen borobk gen boroqn gen borosi * Question 1. * Initial regression reg adj_dppupil_comp * Question 2. * Plot of Residuals (these are the commands) predict residuals, residuals twoway scatter residuals totreg graph save "$datadir\Class 8 graph totreg residuals.gph", replace * Question 3. * Stata White Test. * Add estat imtest, white in line after end of reg command (no comma before imtest). reg adj_dppupil_comp * Question 4. * Initial Regression w/ Robust Standard Errors. * Add "r" (for robust) at end of your reg command, preceded by a comma. reg adj_dppupil_comp * save your do file log close