* Use VOTE1.dta regress voteA prtystrA democA lexpendA lexpendB * Obtain OLS residuals predict res, residual * This just shows that the residuals are, by the Least Squares procedure, * always orthogonal (independent of) the explanatory variables, X'uhat = 0 regress res prtystrA democA lexpendA lexpendB generate res2 = res^2 * The Breusch-Pagan Test for Heteroskedasticity (See equation (8.19), p. 253) * Use the overall F-statistic from this equation regress res2 prtystrA democA lexpendA lexpendB * The special case of White's test (See equation (8.20), p. 253) regress voteA prtystrA democA lexpendA lexpendB * Obtain predicted values of voteA = voteA_hat predict voteA_hat generate voteA_hat2 = voteA_hat^2 * Use the overall F-statistic from this equation regress res2 voteA_hat voteA_hat2