Multiple regression analysis y-Bo+ Bx+B2x2+.. Bkrk+u ◆6. Heteroskedastici Economics 20- Prof anderson
Economics 20 - Prof. Anderson 1 Multiple Regression Analysis y = b0 + b1 x1 + b2 x2 + . . . bk xk + u 6. Heteroskedasticity
What is Heteroskedasticity o Recall the assumption of homoskedasticity implied that conditional on the explanatory variables the variance of the unobserved error u was constant o If this is not true that is if the variance of u is different for different values of the x's then the errors are heteroskedastic Example: estimating returns to education and ability is unobservable, and think the variance in ability differs by educational attainment Economics 20- Prof anderson
Economics 20 - Prof. Anderson 2 What is Heteroskedasticity Recall the assumption of homoskedasticity implied that conditional on the explanatory variables, the variance of the unobserved error, u, was constant If this is not true, that is if the variance of u is different for different values of the x’s, then the errors are heteroskedastic Example: estimating returns to education and ability is unobservable, and think the variance in ability differs by educational attainment
Example of Heteroskedasticity ECx)=Bo+ Bx X X X Economics 20- Prof anderson
Economics 20 - Prof. Anderson 3 . x1 x2 x f(y|x) Example of Heteroskedasticity x3 . . E(y|x) = b0 + b1x
Why Worry about Heteroskedasticity? oLS is still unbiased and consistent. even if we do not assume homoskedasticity The standard errors of the estimates are biased if we have heteroskedasticity o If the standard errors are biased. we can not use the usual t statistics or f statistics or LM statistics for drawing inferences Economics 20- Prof anderson 4
Economics 20 - Prof. Anderson 4 Why Worry About Heteroskedasticity? OLS is still unbiased and consistent, even if we do not assume homoskedasticity The standard errors of the estimates are biased if we have heteroskedasticity If the standard errors are biased, we can not use the usual t statistics or F statistics or LM statistics for drawing inferences
Variance with Heteroskedasticity for the simple case, B,=B,+ ∑(x-x)x ∑( 、)2,SO 1n)=2(=)3 ssT2 L, where SST-2(x-x) x a valid estimator for this when o is 2(x-x)u? where i are are the ois residual SST Economics 20- Prof anderson 5
Economics 20 - Prof. Anderson 5 Variance with Heteroskedasticity ( ) ( ) ( ) ( ) ( ) ( ) , where ˆ are are the OLS residuals ˆ A valid estimator for this when is , where ˆ ,so ˆ For the simple case, 2 2 2 2 2 i 2 2 2 2 1 1 1 2 i x i i x i x i i i i i u SST x x u SST x x SST x x Var x x x x u − = − − = − − = + b b b
Variance with Heteroskedasticity For the general multiple regression model, a valid estimator of VarlB, with heterosked asticity is ∑ SsT2, Where r, is the i residual from regressing x, on all other independen t variable S, and SST, is the sum of squared residuals from this regression Economics 20- Prof anderson 6
Economics 20 - Prof. Anderson 6 Variance with Heteroskedasticity ( ) ( ) is the sum of squared residuals from this regression regressing on all other independen t variable s, and , where ˆ is the residual from ˆ ˆ ˆ ˆ with heterosked asticity is ˆ estimator of For the general multiple regression model, a valid t h 2 2 j j i j j i j i j j SST x r i SST r u V ar Var b = b
Robust standard errors Now that we have a consistent estimate of the variance, the square root can be used as a standard error for inference o Typically call these robust standard errors Sometimes the estimated variance is corrected for degrees of freedom by multiplying by n/(n-k-1) ◆AsSn→∞ it's all the same, though Economics 20- Prof anderson 7
Economics 20 - Prof. Anderson 7 Robust Standard Errors Now that we have a consistent estimate of the variance, the square root can be used as a standard error for inference Typically call these robust standard errors Sometimes the estimated variance is corrected for degrees of freedom by multiplying by n/(n – k – 1) As n → ∞ it’s all the same, though
Robust Standard Errors(cont) o Important to remember that these robust standard errors only have asymptotic justification -with small sample sizes t statistics formed with robust standard errors will not have a distribution close to the t and inferences will not be correct In Stata, robust standard errors are easily obtained using the robust option of reg Economics 20- Prof anderson 8
Economics 20 - Prof. Anderson 8 Robust Standard Errors (cont) Important to remember that these robust standard errors only have asymptotic justification – with small sample sizes t statistics formed with robust standard errors will not have a distribution close to the t, and inferences will not be correct In Stata, robust standard errors are easily obtained using the robust option of reg
A robust m statistic Run ols on the restricted model and save the residuals u o Regress each of the excluded variables on all of the included variables(q different regressions) and save each set of residuals r. r e Regress a variable defined to be=l on ri i …,i, with no intercept o The LM statistic is n-SSR, where SSR, is the sum of squared residuals from this final regression Economics 20- Prof anderson 9
Economics 20 - Prof. Anderson 9 A Robust LM Statistic Run OLS on the restricted model and save the residuals ŭ Regress each of the excluded variables on all of the included variables (q different regressions) and save each set of residuals ř1 , ř2 , …, řq Regress a variable defined to be = 1 on ř1 ŭ, ř2 ŭ, …, řq ŭ, with no intercept The LM statistic is n – SSR1 , where SSR1 is the sum of squared residuals from this final regression
Testing for Heteroskedasticity ◆ Essentially want to test H:Var(lx,x2… xk=0, which is equivalent to Ho: E(ux, x2…,x)=E(2)=a2 If assume the relationship between u and x will be linear. can test as a linear restriction ◆So,forl2=o+6x1+…+axk+y)this means testing Ho: 8=8=...=8=0 Economics 20- Prof anderson 10
Economics 20 - Prof. Anderson 10 Testing for Heteroskedasticity Essentially want to test H0 : Var(u|x1 , x2 ,…, xk ) = 2 , which is equivalent to H0 : E(u 2 |x1 , x2 ,…, xk ) = E(u 2 ) = 2 If assume the relationship between u 2 and xj will be linear, can test as a linear restriction So, for u 2 = d0 + d1 x1 +…+ dk xk + v) this means testing H0 : d1 = d2 = … = dk = 0