Heteroskedasticity Prepared by Vera Tabakova, East Carolina University 8.1 The Nature of Heteroskedasticity 8.2 Using the Least Squares Estimator 8.3 The Generalized Least Squares Estimator 8.4 Detecting Heteroskedasticity Principles of Econometrics, 3rd Edition Slide 8-2 E ( y ) 1 2 x ei y i E ( y i ) y i 1 2 x i y i 1 2 x i ei Principles of Econometrics, 3rd Edition (8.1) (8.2) (8.3) Slide 8-3 Figure 8.1 Heteroskedastic Errors Principles of Econometrics, 3rd Edition Slide 8-4 E ( ei ) 0 var( e i ) 2 cov( e i , e j ) 0 var( y i ) var( e i ) h ( x i ) (8.4) yˆ i 83.42 10.21 x i eˆi y i 83.42 10.21 x i Principles of Econometrics, 3rd Edition Slide 8-5 Figure 8.2 Least Squares Estimated Expenditure Function and Observed Data Points Principles of Econometrics, 3rd Edition Slide 8-6 The existence of heteroskedasticity implies: The least squares estimator is still a linear and unbiased estimator, but it is no longer best. There is another estimator with a smaller variance. The standard errors usually computed for the least squares estimator are incorrect. Confidence intervals and hypothesis tests that use these standard errors may be misleading. Principles of Econometrics, 3rd Edition Slide 8-7 y i 1 2 x i ei var( b2 ) var( e i ) 2 (8.5) 2 N ( xi x ) (8.6) 2 i 1 y i 1 2 x i ei Principles of Econometrics, 3rd Edition var( e i ) i 2 (8.7) Slide 8-8 N N var( b 2 ) wi i 2 2 i 1 i 1 2 ( xi x ) i 1 N N N var( b 2 ) i 1 Principles of Econometrics, 3rd Edition 2 2 w i eˆi ( x i x ) 2 i2 i 1 2 (8.8) ( x i x ) 2 eˆi2 2 ( xi x ) i 1 N 2 (8.9) Slide 8-9 yˆ i 83.42 10.21 x i (27.46) (1.81) (W hite se) (43.41) (2.09) (incorrect se) W hite: b 2 t c se( b 2 ) 10.21 2.024 1.81 [6.55, 13.87 ] Incorrect: b 2 t c se( b 2 ) 10.21 2.024 2.09 [5.97, 14.45] Principles of Econometrics, 3rd Edition Slide 8-10 y i 1 2 x i ei (8.10) E ( ei ) 0 Principles of Econometrics, 3rd Edition var( e i ) i 2 cov( e i , e j ) 0 Slide 8-11 var ei i x i 2 2 1 x i 1 2 x x xi i i yi i y yi xi i1 x Principles of Econometrics, 3rd Edition 1 xi x i2 xi xi (8.11) ei xi xi (8.12) i e ei xi (8.13) Slide 8-12 y i 1 x i1 2 x i 2 e i e var( e ) var i x i i Principles of Econometrics, 3rd Edition 1 1 2 2 var( e i ) xi x xi i (8.14) (8.15) Slide 8-13 To obtain the best linear unbiased estimator for a model with heteroskedasticity of the type specified in equation (8.11): 1. Calculate the transformed variables given in (8.13). 2. Use least squares to estimate the transformed model given in (8.14). Principles of Econometrics, 3rd Edition Slide 8-14 The generalized least squares estimator is as a weighted least squares estimator. Minimizing the sum of squared transformed errors that is given by: N e 2 i 2 N i 1 When ei xi i 1 xi N ( xi 1/ 2 ei ) 2 i 1 is small, the data contain more information about the regression function and the observations are weighted heavily. When xi is large, the data contain less information and the observations are weighted lightly. Principles of Econometrics, 3rd Edition Slide 8-15 yˆ i 78.68 10.45 x i (8.16) (se) (23.79) (1.39) ˆ 2 t c se(ˆ 2 ) 10.451 2.024 1.386 [7.65,13.26] Principles of Econometrics, 3rd Edition Slide 8-16 var( e i ) i x i 2 2 (8.17) ln ( i ) ln ( ) ln ( x i ) 2 2 i exp ln( ) ln( x i ) 2 2 (8.18) exp( 1 2 z i ) Principles of Econometrics, 3rd Edition Slide 8-17 i ex p ( 1 2 z i 2 2 s z iS ) ln ( i ) 1 2 z i 2 (8.19) (8.20) y i E ( y i ) ei 1 2 x i ei Principles of Econometrics, 3rd Edition Slide 8-18 2 2 ln ( eˆi ) ln ( i ) v i 1 2 z i v i (8.21) ln ( ˆ i ) .9 3 7 8 2 .3 2 9 z i 2 2 ˆ i ex p ( ˆ 1 ˆ 1 z i ) yi 1 x i ei 1 2 i i i i Principles of Econometrics, 3rd Edition Slide 8-19 ei 1 1 2 var 2 var( e i ) 2 i 1 i i i yi y ˆ i 1 x ˆ i i i1 x xi ˆ i (8.23) y i 1 x i1 2 x i 2 e i Principles of Econometrics, 3rd Edition i2 (8.22) (8.24) Slide 8-20 y i 1 2 xi 2 k x iK e i var( e i ) i ex p ( 1 2 z i 2 2 Principles of Econometrics, 3rd Edition s z iS ) (8.25) (8.26) Slide 8-21 The steps for obtaining a feasible generalized least squares estimator for 1 , 2 , ,K are: 1. Estimate (8.25) by least squares and compute the squares of the least squares residuals 2. Estimate 1 , 2 , ln eˆi 1 2 z i 2 2 Principles of Econometrics, 3rd Edition 2 eˆ i . ,S by applying least squares to the equation S z iS v i Slide 8-22 3. Compute variance estimates ˆ i2 ex p ( ˆ 1 ˆ 2 z i 2 ˆ S z iS. ) 4. Compute the transformed observations defined by (8.23), including x i3 , , x iK if K 2. 5. Apply least squares to (8.24), or to an extended version of (8.24) if K 2 . yˆ i 76.05 10.63 x (se) Principles of Econometrics, 3rd Edition (9.71) (.97 ) (8.27) Slide 8-23 W A G E 9.914 1.234 E D U C .133 E X P E R 1.524 M E T R O (se) (1.08) (.070) (.015) W A G E Mi M 1 2 E D U C Mi 3 E X P E RMi eMi W A G E Ri R 1 2 E D U C Ri 3 E X P E R Ri e Ri (.431) i 1, 2, i 1, 2, ,NM ,NR (8.28) (8.29a) (8.29b) b M 1 9.914 1.524 8.39 Principles of Econometrics, 3rd Edition Slide 8-24 var( e M i ) M 2 var( e R i ) R 2 ˆ M 3 1 .8 2 4 2 2 ˆ R 1 5 .2 4 3 b M 1 9.052 b M 2 1.282 b R 1 6.166 b R 2 .956 Principles of Econometrics, 3rd Edition (8.30) b M 3 .1346 b R 3 .1260 Slide 8-25 W AG E Mi 1 ED U C Mi E X P E RMi eMi M1 2 3 M M M M M i 1, 2, ,NM W A G E Ri 1 E D U C Ri E X P E R Ri eRi R1 2 3 R R R R R i 1, 2, Principles of Econometrics, 3rd Edition (8.31a) (8.31b) ,NR Slide 8-26 Feasible generalized least squares: 1. Obtain estimated ˆ M and ˆ R by applying least squares separately to the metropolitan and rural observations. 2. ˆ M w hen M E T R O i 1 ˆ i ˆ R w hen M E T R O i 0 3. Apply least squares to the transformed model W AG Ei 1 EDUCi E X P E Ri M E T R O i ei R1 2 3 ˆ ˆ ˆ ˆ ˆ ˆ i i i i i i Principles of Econometrics, 3rd Edition (8.32) Slide 8-27 W A G E 9.398 1.196 E D U C .132 E X P E R 1.539 M E T R O (se) (1.02) (.069) Principles of Econometrics, 3rd Edition (.015) (.346) (8.33) Slide 8-28 Remark: To implement the generalized least squares estimators described in this Section for three alternative heteroskedastic specifications, an assumption about the form of the heteroskedasticity is required. Using least squares with White standard errors avoids the need to make an assumption about the form of heteroskedasticity, but does not realize the potential efficiency gains from generalized least squares. Principles of Econometrics, 3rd Edition Slide 8-29 8.4.1 Residual Plots Estimate the model using least squares and plot the least squares residuals. With more than one explanatory variable, plot the least squares residuals against each explanatory variable, or against yˆ i , to see if those residuals vary in a systematic way relative to the specified variable. Principles of Econometrics, 3rd Edition Slide 8-30 8.4.2 The Goldfeld-Quandt Test F 2 2 ˆ M M ˆ 2 R F( N M K M , N R K R ) 2 R (8.34) H 0 : M R against H 0 : M R 2 2 F Principles of Econometrics, 3rd Edition 2 2 ˆ M ˆ 2 R 31.824 2 (8.35) 2.09 15.243 Slide 8-31 8.4.2 The Goldfeld-Quandt Test 2 ˆ 1 3 5 7 4 .8 2 ˆ 2 1 2, 9 2 1 .9 F 2 ˆ 2 ˆ 2 1 12, 921.9 3.61 3574.8 Principles of Econometrics, 3rd Edition Slide 8-32 8.4.3 Testing the Variance Function y i E ( y i ) ei 1 2 x i 2 K x iK ei var( y i ) i E ( e i ) h ( 1 2 z i 2 2 h ( 1 2 zi 2 2 (8.36) S z iS ) S z iS ) exp( 1 2 z i 2 (8.37) S z iS ) h ( 1 2 z i ) exp ln( ) ln( x i ) 2 Principles of Econometrics, 3rd Edition Slide 8-33 8.4.3 Testing the Variance Function h ( 1 2 zi 2 S z iS ) 1 2 z i 2 h ( 1 2 zi 2 H 0 : 2 3 S z iS (8.38) S z iS ) h ( 1 ) S 0 (8.39) H 1 : not all the s in H 0 are zero Principles of Econometrics, 3rd Edition Slide 8-34 8.4.3 Testing the Variance Function var( y i ) i E ( e i ) 1 2 z i 2 2 2 ei E ( ei ) v i 1 2 z i 2 2 2 2 eˆi 1 2 z i 2 NR 2 Principles of Econometrics, 3rd Edition 2 S z iS (8.40) S z iS v i (8.41) S z iS v i (8.42) ( S 1) (8.43) 2 Slide 8-35 8.4.3a The White Test E ( y i ) 1 2 xi 2 3 xi 3 z2 x2 Principles of Econometrics, 3rd Edition z 3 x3 z4 x2 2 z 5 x3 2 Slide 8-36 8.4.3b Testing the Food Expenditure Example S S T 4, 6 1 0, 7 4 9, 4 4 1 R 1 2 S S E 3, 7 5 9, 5 5 6,1 6 9 SSE .1 8 4 6 SST N R 40 .1846 7.38 2 2 N R 40 .18888 7.555 2 2 Principles of Econometrics, 3rd Edition p -value .023 Slide 8-37 Breusch-Pagan test generalized least squares Goldfeld-Quandt test heteroskedastic partition heteroskedasticity heteroskedasticity-consistent standard errors homoskedasticity Lagrange multiplier test mean function residual plot transformed model variance function weighted least squares White test Principles of Econometrics, 3rd Edition Slide 8-38 Principles of Econometrics, 3rd Edition Slide 8-39 y i 1 2 x i ei E ( ei ) 0 var ( e i ) i cov( e i , e j ) 0 2 b2 2 wi Principles of Econometrics, 3rd Edition w i ei (i j ) (8A.1) xi x xi x 2 Slide 8-40 E b2 E 2 E w i ei 2 Principles of Econometrics, 3rd Edition w i E ei 2 Slide 8-41 var b 2 var w i e i w i var e i 2 i j w w i w j cov ei , e j 2 i (8A.2) 2 i ( x i x ) 2 i2 ( xi x ) 2 Principles of Econometrics, 3rd Edition 2 Slide 8-42 var( b 2 ) Principles of Econometrics, 3rd Edition 2 xi x 2 (8A.3) Slide 8-43 2 eˆi 1 2 z i 2 F (8B.2) SSE / ( N S ) i 1 Principles of Econometrics, 3rd Edition (8B.1) ( SST SSE ) / ( S 1) N SST S z iS v i 2 2 eˆi eˆ 2 N and SSE 2 vˆi i 1 Slide 8-44 ( S 1) F 2 SST SSE SSE / ( N S ) var( e ) var( v i ) 2 i 2 SSE N S SST SSE ( S 1) 2 (8B.3) (8B.4) (8B.5) 2 i var( e ) Principles of Econometrics, 3rd Edition Slide 8-45 SST SSE 2 e i2 var 2 2 e 2 ˆ 1 4 var( e ) Principles of Econometrics, 3rd Edition 1 N var( e i ) 2 var( e i ) 2 e 2 e 2 i (8B.6) 4 e N (eˆ i 1 2 i eˆ ) 2 2 2 SST 4 (8B.7) N Slide 8-46 2 SST SSE SST / N SSE N 1 SST NR Principles of Econometrics, 3rd Edition (8B.8) 2 Slide 8-47