Heteroskedasticity in the Linear Model 2 Fall 2020 Unversit¨Atbasel
Total Page:16
File Type:pdf, Size:1020Kb
Short Guides to Microeconometrics Kurt Schmidheiny Heteroskedasticity in the Linear Model 2 Fall 2020 Unversit¨atBasel Note that under OLS2 (i.i.d. sample) the errors are unconditionally 2 homoscedastic, V [ui] = σ but allowed to be conditionally heteroscedas- tic, V [u jx ] = σ2. Assuming OLS2 and OLS3c provides that the errors Heteroskedasticity in the Linear Model i i i are also not conditionally autocorrelated, i.e. 8i 6= j : Cov[ui; ujjxi; xj] = E[uiujjxi; xj] = E[uijxi] · E[ujjxj] = 0 . Also note that the condition- ing on xi is less restrictive than it may seem: if the conditional variance V [uijxi] depends on other exogenous variables (or functions of them), we 1 Introduction can include these variables in xi and set the corresponding β parameters This handout extends the handout on \The Multiple Linear Regression to zero. 0 model" and refers to its definitions and assumptions in section 2. The variance-covariance of the vector of error terms u = (u1; u2; :::; uN ) This handouts relaxes the homoscedasticity assumption (OLS4a) and in the whole sample is therefore shows how the parameters of the linear model are correctly estimated and 0 2 tested when the error terms are heteroscedastic (OLS4b). V [ujX] = E[uu jX] = σ Ω 0 2 1 0 1 σ1 0 ··· 0 !1 0 ··· 0 2 The Econometric Model B 0 σ2 ··· 0 C B 0 ! ··· 0 C B 2 C 2 B 2 C = B . C = σ B . C B . .. C B . .. C Consider the multiple linear regression model for observation i = 1; :::; N @ . A @ . A 2 0 0 ··· σN 0 0 ··· !N 0 yi = xiβ + ui where x0 is a (K + 1)-dimensional row vector of K explanatory variables i 3 A Generic Case: Groupewise Heteroskedasticity and a constant, β is a (K + 1)-dimensional column vector of parameters and ui is a scalar called the error term. Heteroskedasticity is sometimes a direct consequence of the construc- Assume OLS1, OLS2, OLS3 and tion of the data. Consider the following linear regression model with homoscedastic errors OLS4: Error Variance 0 yi = xiβ + ui b) conditional heteroscedasticity: 2 with V [uijxi] = V [ui] = σ . V [u jx ] = σ2 = σ2! = σ2!(x ) i i i i i Assume that instead of the individual observations y and x only the 2 0 i i and E[ui xixi] = QXΩX is p.d. and finite mean values yg and xg for g = 1; :::; G groups are observed. The error 2 term in the resulting regression model where !(:) is a function constant across i. The decomposition of σi into 2 !i and σ is arbitrary but useful. 0 yg = xgβ + ug Version: 29-10-2020, 23:34 3 Short Guides to Microeconometrics Heteroskedasticity in the Linear Model 4 2 2 is now conditionally heteroskedastic with V [ugjNg] = σg = σ =Ng, where 4 Estimation with OLS Ng is a random variable with the number of observations in group g. The parameter β can be estimated with the usual OLS estimator 0 −1 0 βbOLS = (X X) X y The OLS estimator of β remains unbiased under OLS1, OLS2, OLS3c, OLS4b, and OLS5 in small samples. Additionally assuming OLS3a, it is normally distributed in small samples. It is consistent and approximately normally distributed under OLS1, OLS2, OLS3d, OLS4a or OLS4b and OLS5, in large samples. However, the OLS estimator is not efficient any more. More importantly, the usual standard errors of the OLS estimator and tests (t-, F -, z-, Wald-) based on them are not valid any more. 5 Estimating the Variance of the OLS Estimator The small sample covariance matrix of βbOLS is under OLS4b 0 −1 0 2 0 −1 V [βbOLSjX] = (X X) X σ ΩX (X X) 2 0 −1 and differs from usual OLS where V [βbOLSjX] = σ (X X) . Conse- 2 0 −1 quently, the usual estimator Vb[βbOLSjX] = σc(X X) is biased. Usual small sample test procedures, such as the F - or t-Test, based on the usual estimator are therefore not valid. The OLS estimator is asymptotically normally distributed under OLS1, OLS2, OLS3d, and OLS5 p d −1 −1 N(βb − β) −! N 0;QXX QXΩX QXX 2 0 0 where QXΩX = E[ui xixi] and QXX = E[xixi]. The OLS estimator is therefore approximately normally distributed in large samples as A βb ∼ N β; Avar[βb] 5 Short Guides to Microeconometrics Heteroskedasticity in the Linear Model 6 −1 −1 −1 where Avar[βb] = N QXX QXΩX QXX can be consistently estimated as 7 Estimation with GLS/WLS when Ω is Known " N # 0 −1 X 2 0 0 −1 When Ω is known, β is efficiently estimated with generalized least squares Avar[ [βb] = (X X) ubi xixi (X X) i=1 (GLS) −1 0 −1 0 −1 with some additional assumptions on higher order moments of xi (see βbGLS = X Ω X X Ω y: White 1980). The GLS estimator simplifies in the case of heteroskedasticity to This so-called White or Eicker-Huber-White estimator of the covari- ~ 0 ~ −1 ~ 0 ance matrix is a heteroskedasticity-consistent covariance matrix estimator βbW LS = (X X) X y~ that does not require any assumptions on the form of heteroscedasticity where (though we assumed independence of the error terms in OLS2 ). Stan- 0 p 1 0 0 p 1 y1= !1 x1= !1 dard errors based on the White estimator are often called robust. We can B . C ~ B . C y~ = B . C ; X = B . C perform the usual z- and Wald-test for large samples using the White @ A @ A p 0 p covariance estimator. yN = !N xN = !N Note: t- and F -Tests using the White covariance estimator are only and is called weighted least squares (WLS) estimator. The WLS estimator asymptotically valid because the White covariance estimator is consistent of β can therefore be estimated by running OLS with the transformed but not unbiased. It is therefore more appropriate to use large sample variables. tests (z, Wald). Note: the above transformation of the explanatory variables also ap- Bootstrapping (see the handout on \The Bootstrap") is an alternative p plies to the constant, i.e.x ~i0 = 1= !i. The OLS regression using the method to estimate a heteroscedasticity robust covariance matrix. transformed variables does not include an additional constant. The WLS estimator minimizes the sum of squared residuals weighted 6 Testing for Heteroskedasticity by 1=!i: There are several tests for the assumption that the error term is ho- N N X 0 2 X 1 0 2 S (α; β) = (~yi − x~iβ) = (yi − xiβ) ! min moskedastic. White (1980)'s test is general and does not presume a par- ! β i=1 i=1 i ticular form of heteroskedasticity. Unfortunately, little can be said about its power and it has poor small sample properties unless the number of The WLS estimator of β is unbiased and efficient (under OLS1, OLS2, regressors is very small. If we have prior knowledge that the variance σ2 i OLS3c, OLS4b, and OLS5 ) and normally distributed additionally assum- is a linear (in parameters) function of explanatory variables, the Breusch- ing OLS3a (normality) in small samples. Pagan (1979) test is more powerful. Koenker (1981) proposes a variant of The WLS estimator of β is consistent, asymptotically efficient and ap- the Breusch-Pagan test that does not assume normally distributed errors. proximately normally distributed under OLS4b (conditional heteroscedas- Note: In practice we often do not test for heteroskedasticity but di- ticity) and OLS2 , OLS1, OLS3d, and a modification of OLS5 rectly report heteroskedasticity-robust standard errors. 7 Short Guides to Microeconometrics Heteroskedasticity in the Linear Model 8 OLS5: Identifiability in the calculations for βbF GLS and Avar[ [βbF GLS]. X0Ω−1X is p.d. and finite The FGLS estimator is consistent and approximately normally dis- −1 0 tributed in large samples under OLS1, OLS2 (fxi; zi; yig i.i.d.), OLS3d, E[! xixi] = QXΩ−1X is p.d. and finite i 2 OLS4b, OLS5 and some additional more technical assumptions. If σi is where !i = !(xi) is a function of xi. correctly specified, βF GLS is asymptotically efficient and the usual tests The covariance matrix of βbW LS can be estimated as (z, Wald) for large samples are valid; small samples tests are only asymp- 2 ~ 0 ~ −1 2 Avar[ [βbW LS] = Vb[βbW LS] = σc(X X) totically valid and nothing is gained from using them. If σi is not correctly 0 0 specified, the usual covariance matrix is inconsistent and tests (z, Wald) where σ2 = u~ u=~ (N − K − 1) in small samples and σ2 = u~ u=N~ in large c b b c b b invalid. In this case, the White covariance estimator used after FGLS pro- samples and u~ =y ~ − X~β . Usual tests (t-, F -) for small samples b bGLS vides consistent standard errors and valid large sample tests (z, Wald). are valid (under OLS1, OLS2, OLS3a, OLS4b and OLS5 ; usual tests (z, Note: In practice, we often choose a simple model for heteroscedastic- Wald) for large samples are also valid (under OLS1, OLS2, OLS3d, OLS4b ity using only one or two regressors and use robust standard errors. and OLS5 ). 8 Estimation with FGLS/FWLS when Ω is Unknown In practice, Ω is typically unknown. However, we can model the !i's as a function of the data and estimate this relationship. Feasible gener- alized least squares (FGLS) replaces !i by their predicted values !bi and calculates then βbF GLS as if !i were known. A useful model for the error variance is 2 0 σi = V [uijzi] = exp(ziδ) where zi are L + 1 variables that may belong to xi including a constant and δ is a vector of parameters.