/* stata -b do garrett_4912.do & */ log using garrett_4912.log, replace insheet using garrum6.csv /* run OLS regression */ regress gdp oild demand corp leftlab clint /* graph residuals against predicted values */ predict yhat predict e, resid plot e yhat /* conduct Breusch-Pagan test */ hettest oild demand corp leftlab clint, rhs /* compute White robust standard errors */ regress gdp oild demand corp leftlab clint, robust /* keep only time series for the UK */ keep if (icc_3 == 1) /* make Stata treat the data as a time series with year being the period indicator */ tsset year regress gdp oild demand corp leftlab clint /* plot residuals against time */ predict r, rstandard graph twoway scatter r year, c(l) yline(0) /* compute Durbin-Watson statistic */ estat dwatson /* compute Breusch-Godfrey test statistic */ estat bgodfrey