You are on page 1of 15

EC3090 Econometrics Junior Sophister 2009-2010

Topic 6: Heteroscedasticity

Reading: Wooldridge, Chapter 8 Gujarati and Porter, Chapter 11

Topic 6: Heteroscedasticity
1. What is meant by the term homoscedasticity in the context of the General Linear Model?
Yi ! F 0  F1 X 1i  F 2 X 2i  .....  F k X ki  ui

Homoscedasticity means that the error terms in the general linear model are identically distributed, i.e. that they have the same variance. Recall the GM assumptions: Assumptions required to prove unbiasedness: A1: Regression model is linear in parameters A2: X are non-stochastic or fixed in repeated sampling A3: Zero conditional mean A4: Sample is random A5: Variability in the Xs and there is no perfect collinearity in the Xs Assumptions required to prove efficiency: A6: Homoscedasticity and no autocorrelation V ui | X 1i , X 2i ,...., X ki ! W 2 Cov i , u j ! 0 u

Topic 6: Heteroscedasticity
2. Consequences for OLS estimation of the General Linear Model
OLS estimator will no longer be efficient. There will exist a different linear unbiased estimator with a lower variance In practice: t tests and confidence intervals will be based on the wrong estimator of the standard error of the OLS estimator F tests and LM tests will no longer satisfy distributional assumptions required for their construction

Topic 6: Heteroscedasticity
3. Heteroscedasticity-robust inference
One possible way to proceed in the presence of heteroscedasticity is to correct the standard errors, i.e. make them heteroscedasticity-robust Consider the simple regression model:
Yi ! F 0  F1
1i
2

 ui

Assume

ui
Show

1i

2i

,....,
1

ki

F ! W
1i

SST

If

ui
Show

2i

,....,
n i !1

ki

! W i2
2 2

V F1 !

X i  X W i

SSTX 2

Topic 6: Heteroscedasticity
3. Heteroscedasticity-robust inference X  X W
n 2

Estimate

V F1 !

i !1

2 i

SSTX 2
V F1 !

using (White, 1980):

i !1

2 X i  X ui
2

SSTX 2

where ui2 are the square of the OLS residuals from the original model This is a valid estimator for the variance of the OLS estimator even if the errors are homoscedastic Extension to multiple regression model:
V Fk !

i !1

rki ui

SSRk 2

ri 2 is the residual from regressing X on all other explanatory variables k SSRk is the sum of squared residuals from this regression

Topic 6: Heteroscedasticity
4. Testing for presence of heteroscedasticity
Even though Whites standard errors are valid for all types of heteroscedasticity and homoscedasticity they are only appropriate in large samples Detecting and correcting for heteroscedasticity may therefore be necessary consider both informal and formal methods Consider the General Linear Model:
Yi ! F 0  F1 X 1i  F 2 X 2i  .....  F k X ki  ui

We wish to test the null hypothesis (restricted model):


H 0 : V ui | X 1i , X 2 i ,...., X ki ! W 2 ( omoscedasticity)

This is equivalent to testing that the square of the error terms is unrelated to the explanatory variables (illustrate)

Topic 6: Heteroscedasticity
4. Testing for presence of heteroscedasticity
Many possible alternative hypotheses, i.e. many possible forms for h in:
A

ui

X 1i , X 2i ,...., X ki ! W 2 h X 1i , X 2 i ,...., X ki

(Heteroscedasticity)

Most simple functional relationship is linear. i.e.


ui2 ! H 0  H 1 X 1i  H 2 X 2i  .....  H k X ki  vi

Null hypothesis of homoscedasticity will be:


H 0 : H1 ! 0, H 2 ! 0,.........., H k ! 0

However, ui2 not observed so replace with estimator ui2 from original regression and run an auxiliary regression of ui2 on each of the explanatory variables

Use F-test or LM test to test for joint significance of H parameters

Topic 6: Heteroscedasticity
4. Testing for presence of heteroscedasticity
This test is known as the Breusch-Pagen test: Step 1: Estimate original model under the assumption of homoscedasticity (i.e. restricted model) and keep the residuals:
Yi ! F 0  F1 X 1i  F 2 X 2i  .....  F k X ki  ui

Step 2: Run a regression of the square of the residuals on all of the X variables and keep the R2:
~ ~ ~ ~ ~ ui2 ! H 0  H1 X 1i  H 2 X 2 i  .....  H k X ki  vi

Step 3: Construct either the F-statistic or LM statistic and compare to the critical value from the Fk ,n k 1 or G k2 distributions (or compute pvalue) 2
|

R k  R n  k  1 1
2

k , n  k 1

LM ! n

Large values inconsistent with null hypothesis (i.e. Xs explain variation in square of the residuals)

Topic 6: Heteroscedasticity
4. Testing for presence of heteroscedasticity
Whites test (illustrate using k=3): Step 1: Estimate original model under the assumption of homoscedasticity (i.e. restricted model) and keep the residuals:
Yi ! F 0  F1 X 1i  F 2 X 2 i  F 3 X 3i  ui

Step 2: Run a regression of the square of the residuals on all of the X variables, their squares and cross-products and keep the R2:
~ ~ ~ ~ ~ ~ 2 ~ ui2 ! H 0  H 1 X 1i  H 2 X 2 i  H 3 X 3i  H 4 X 12i  H 5 X 2i  H 6 X 32i ~ ~ ~  H 7 X 1i X 2 i  H 8 X 1i X 3i  H 9 X 2 i X 3i  ~i v

Step 3: Construct either the F-statistic or LM statistic and compare to the critical value from the F9,n 91 or G 92 distributions (or compute pvalue) Large values inconsistent with null hypothesis Note: Loss of degrees of freedom in running this test

Topic 6: Heteroscedasticity
4. Testing for presence of heteroscedasticity
Alternative to White (illustrate using k=3): Step 1: Estimate original model under the assumption of homoscedasticity (i.e. restricted model) and keep the residuals and the fitted values:
Yi ! F 0  F1 X 1i  F 2 X 2 i  F 3 X 3i  ui Y !F F X F X F X
i 0 1 1i 2 2i 3 3i

Step 2: Run a regression of the square of the residuals on the fitted values and their square and keep the R2:
~ ~ ~ ~ ui2 ! H 0  H1Yi  H 2Yi 2  vi

Step 3: Construct either the F-statistic or LM statistic and compare to the critical value from the 2,n  21 or G 22 distributions (or compute pvalue) Large values inconsistent with null

Topic 6: Heteroscedasticity
5. Correcting for heteroscedasticity
If heteroscedasticity is detected you can proceed to use Whites standard errors however a more efficient estimator can be found where the form of the heteroscedastcity is known. This involves using Weighted Least Squares Consider the General Linear Model:
Yi ! F 0  F1 X 1i  F 2 X 2i  .....  F k X ki  ui

Assume that:
V ui | X 1i , X 2i ,...., X ki ! W 2 h X 1i , X 2 i ,...., X ki ! W 2 hi

Note:

hi " 0

or all possible values o X

If we know form of h we can transform original model so that the error terms are homoscedastic (illustrate):
Yi 1 X X X u ! F0  F1 1i  F 2 2 i  .....  F k ki  i hi hi hi hi hi hi

Topic 6: Heteroscedasticity
5. Correcting for heteroscedasticity
Using OLS on transformed model will produce BLUE estimates This procedure is known as Generalised Least Squares or Weighted Least Squares Each observation is weighted by the inverse of its standard deviation Interpret estimates in same way as OLS GLS estimates more efficient May be differences in parameter estimates but should only be due to sampling error If significantly different then weights may be incorrect

What if h unknown?

Topic 6: Heteroscedasticity
5. Correcting for heteroscedasticity
If h is unknown then it can be estimated and the estimate can be used to transform the model This is known as Feasible Generalised Least Squares Example: Assume ui X 1i , X 2i ,...., X ki ! W i2 ! W 2 exp H 0  H1 X 1i  H 2 X 2i  ...  H k X ki If the H s are known we can proceed as before If unknown transform variance equation into an econometric model ui X 1i , X 2i ,...., X ki ! E ui2 X 1i , X 2i ,...., X ki From before we saw that Adding an error term: ui2 ! W 2 exp H 0  H1 X 1i  H 2 X 2i  ...  H k X ki vi Taking logs: ln ui2 ! E 0  H1 X 1i  H 2 X 2 i  ...  H k X ki  ei
where E 0 ! ln W 2  H 0 and ei ! ln vi
2 Estimate ui with ui2 the OLS residuals from the original model and ~ estimate auxiliary regression using OLS and obtain fitted values gi ~ ~ hi ! exp g i and transform original model Use fitted values to estimate ~ using 1 hi . Proceed as in GLS case

Topic 6: Heteroscedasticity
5. Correcting for heteroscedasticity
Feasible Generalised Least Squares: Step 1: Estimate original model and keep the residuals:
Yi ! F 0  F1 X 1i  F 2 X 2 i  .....  F k X ki  ui

Step 2: Create ln ui2 by squaring the residuals and then taking the natural log
2 Step 3: Run a regression of ln ui on each of the explanatory variables ~ and obtain the fitted values gi
~ ~ ~ ~ ~ ! ln u 2 ! E  H X  H X  .....  H X i ~0 1 1i gi 2 2i k ki

~ ~ Step 4: Take the exponent of these fitted values hi ! exp gi ~ Step 5: Transform the original model using 1 hi Yi X1 X2 X ki ui 1 ! F 0 ~  F1 ~i  F 2 ~i  .....  F k ~  ~ ~ hi hi hi hi hi hi

Step 6: Estimate using OLS

Topic 6: Heteroscedasticity
6. Example p294, Q8.2, Wooldridge
Consider a linear model to explain monthly beer consumption:
beeri ! F 0  F1inci  F 2 pricei  F 3 educi  F 4 femalei  ui E ui | inci , pricei , educi , femalei ! 0

ui

inci , pricei , educi , fe alei ! W 2 inci2

Write the transformed equation that has a homoscedastic error term and show that the error term is homoscedastic.

You might also like