You are on page 1of 51

10.

Gujarati(2003): Chapter11

M. Balclar, EMU, ECON 503


10.2
Homoscedastic Case
f(Yi) Yi

er
tu
ndi
pe
ex
.
.
.
Var(ui) = E(ui2)= 2

x11=80 x12=90 x13=100 x1i


income
The probability density function for Yi at two
levels of family income, X i , are identical.
M. Balclar, EMU, ECON 503
10.3
Homoscedastic pattern of errors
yi
.
.. . .
.. . . . .
. .
. .. .
.. . . .
. . .
. . . .
. .
. . . . .
..
. .
.

0 The scattered points spread out quite equally xi


M. Balclar, EMU, ECON 503
10.4
Heteroscedasticity Case
f(Yi)

Y
i
r e
itu
n d
p e
x
e
.
.
.
Var(ui) = E(ui2)= i2

x11 x12 x13 income x1


The variance of Yi increases as family income,
Xi, increases.
M. Balclar, EMU, ECON 503
10.5
Heteroscedastic pattern of errors
.
yt . .
. .
. . .
. .
. . . .
. . . . .
. . . .. . . .
. . . . . . .
. . . . .
. . . . .
. .

0 The scattered points spread out quite unequally xt


M. Balclar, EMU, ECON 503
10.6
Definition of Heteroscedasticity: Var(ui) = E(ui2) = i2 2

Two-variable regression: Y = 1 + 2 X + ui
xy
^
2 = 2
= ki Y = ki (1 + 2 X + ui) k =0i
x =1
k X i i
^ = + k u
=> 2 2 i iE(^) = unbiased 2 2

^2) = E (^2 - 2)2 = E (ki ui)2


Var (
= E (k12 u12 + k22 u22 + . + 2k1k2 u1 u2 + )
= k12 12 + k22 22 + ..+ 0 + ...
= k i2 i2
if 12 22 32
xi2i2 i.e., heteroscedasticity
=
( xi2)2 if 12 = 22 = 32 =
^
2) =
Var ( 2 i.e., homoscedasticity
xi2
M. Balclar, EMU, ECON 503
10.7
Consequences of heteroscedasticity

1. OLS estimators are still linear and unbiased


^
2. Var( i )s are not minimum.

=> not the best => not efficiency => not BLUE
xii2 2
3. Var ( ^2) = ^ Two-variable
instead of Var( 2) =
2
(xi ) 2 x2 case
^ u
^2
4. 2 = ^ 2 ) 2
i
n-k is biased, E(

5. t and F statistics are unreliable. Y = 0 + 1 X + u


SEE = ^ RSS = ^ u2
Cannot be min.
M. Balclar, EMU, ECON 503
10.8
Detection of heteroscedasticity
1. Graphical method :
plot the estimated residual ( ^ui ) or squared (u
^i 2 ) against the
predicted dependent Variable (Y ^ ) or any independent
i
variable(Xi).

Observe the graph whether there is a systemic pattern as:

u^ 2

Yes,
heteroscedasticity exists

^
Y
M. Balclar, EMU, ECON 503
10.9
Detection of heteroscedasticity: Graphical method
u^2 u^2 yes u^2 yes
no heteroscedasticity

^
Y ^
Y ^
Y
yes yes yes
u^2 u^2 u^2

^
Y ^ ^
Y Y
M. Balclar, EMU, ECON 503
Statistical test: (i) Park test 10.10

H0 : No heteroscedasticity exists i.e., Var( ui ) = 2


(homoscedasticity)
H1 : Yes, heteroscedasticity exists i.e., Var( ui ) = i2
Park test:
Step 1. Run OLS on regression: Yi = 1 + 2 Xi + ui , obtain^ui
^
Step 2. Take square and take log : ln ( ui2)
^
Step 3. Run OLS on regression: ln( ui2) = 1* + 2* ln Xi + vi
Suspected variable
that causes
Step 4. Use t-test to test H0 : 2* = 0 (Homoscedasticity) heteroscedasticity

If t* > tc ==> reject H0 ==> heteroscedasticity exists

If t* < tc ==> not reject H0 ==> homoscedasticity


M. Balclar, EMU, ECON 503
10.11
Example: Studenmund (2001), Equation 10.24, pp.370

Step 1

M. Balclar, EMU, ECON 503


10.12
Check the residuals whether they are spreading out or not?

M. Balclar, EMU, ECON 503


10.13
Step 2:
Obtain the residuals from previous regression,
take squares and take logs

M. Balclar, EMU, ECON 503


10.14
Step 3 & 4

Ln( ^u 2 ) = 1* + 2* ln Xi + vi

If | t | > tc => reject H0


=> heteroscedasticity

Refers to Studenmund (2001), Eq.(10.26), pp.373


M. Balclar, EMU, ECON 503
10.15
(ii) Glejser Test
Glejser used the followingfunctional forms:

Use t-test to test:


H0 : 2 = 0 (Homoscedasticity)

M. Balclar, EMU, ECON 503


10.16
(iii) Spearmans Rank Correlation Test

df = n-2
Use t-test to test:
H0 : rs = 0 (Homoscedasticity)

df = n-2

where di = difference in the ranks


M. Balclar, EMU, ECON 503
10.17
(iv)The Goldfeld-Quandt Test
H0 : homoscedasticity Var ( ui ) = 2
H1 : heteroscedasticity Var ( ui ) = i2
Goldfeld-Quandt Test procedures:
(1) Order or rank the observations according to the values of Xi,
beginning with the lowest X value.
(2) Omit c central observations, where c is specified a priori, and
divide the remaining (n-c) observation into two groups each of
(n-c)/2 observations.
(3) Run the separate regression on two sub-samples and obtain the
respective RSS1 and RSS2.. Each RSS has [(n-c)/2 - k] df
RSS2/df2
(4) Compute the -ratio: =
RSS1/df1
(5) Compare the and the Fc, if > Fc (, ((n-c)/2-k), ((n-c)/2)-k)
==> reject the H0
M. Balclar, EMU, ECON 503
Gujarati(2003)Table 11.3 Re-order data 10.18

Run regression based


on this group of data (n1=13),
Obtains RSS1

Omit central observations


(c = 4)

Run regression based


on this group of data (n2=13),
Obtains RSS2

RSS 2 / df 2
= > Fc ?
M. Balclar, EMU, ECON 503 RSS1 / df1
(v) BreuschPaganGodfrey Test 10.19

some or all of the Xs can serve as Zs

M. Balclar, EMU, ECON 503


(v) BreuschPaganGodfrey Test 10.20

M. Balclar, EMU, ECON 503


(vi) Whites heteroscedasticity test (no cross terms) 10.21
(LM test)
H0 : homoscedasticity Var ( ui ) = 2
H1 : heteroscedasticity Var ( ui ) = i2
Test procedures:
(1) Run OLS on regression: Yi = 1 + 2X2i + 3X3i +...+ qXqi + ui ,
obtain the residuals, ^ui
(2) Run the auxiliary regression:
ui2 = 1 + 2 X 2i + ...+ q X qi + q+1 X 22i + ...+ 2q1 X qi2 + vi
H0: 2 = 3 = = 2q-1 = 0
~ 2df
(3) Compute W (or LM) = nR2 asy
(4) Compare the W and 2df(=2q-1) (where the df is # of regressors in (2))
if W > 2df ==> reject the Ho
M. Balclar, EMU, ECON 503
10.22
Yi = 1 + 2X2i + 3X3i + 4X4i + ui

M. Balclar, EMU, ECON 503


10.23

M. Balclar, EMU, ECON 503


10.24

W=

2(0.05, 6) = 12.59
W> reject Ho
2(0.10, 6) = 10.64

The White test for a linear model


The test statistic (nR2) indicates
heteroscedasticity is existed.

M. Balclar, EMU, ECON 503


10.25

2(0.05, 6) = 12.59
W< not reject Ho
2(0.10, 6) = 10.64

After transform the linear model to a log-log model.

The White test for a log-log model of the same data


The W-statistic (nRM.2)Balclar,
indicates heteroscedasticity
EMU, ECON 503 is not existed
10.26
(vii) Whites general heteroscedasticity test (with cross terms)

H0 : homoscedasticity Var ( ui ) = 2
H1 : heteroscedasticity Var ( ui ) = i2

Test procedures:
(1) Run OLS on regression: Yi = 1 + 2X2i + 3X3i + ui ,
obtain the residuals, ^
ui
(2) Run the auxiliary regression:
^ui2 = 1 + 2 X2i + 3 X3i + 4 X22i + 5 X23i + 6 X2i X3i + vi

~ 2df
(3) Compute W (or LM) = nR2 asy

(4) Compare the W and 2df (where the df is # of regressors in (2))


if W > 2df ==> reject the Ho

M. Balclar, EMU, ECON 503


10.27

M. Balclar, EMU, ECON 503


Example 8.4 (Wooldridge, pp.258) 10.28

W=

2(0.05, 9) = 16.92
W>  reject Ho
(0.10, 9) = 14.68
2

The White test for a linear model


The test statistic indicates
heteroscedasticity is existed.

M. Balclar, EMU, ECON 503


For the log-log model 10.29

2(0.05, 9) = 16.92
W<  not reject Ho
2(0.10, 9) = 14.68

The White test for a log-log model


The test statistic indicates
heteroscedasticity is not existed

M. Balclar, EMU, ECON 503


10.30
Remedy :Weighted Least Squares (WLS)
Suppose : Y = 1 + 2 X2 + 3 X3 + ui
E ( ui ) = 0, E ( ui uj )= 0 ij

Var (u i2) = i2 = 2 Z(X2) = 2Zi2 = 2E(Yi)2 If Var(ui2)=2Zi

If all Zi = 1 (or any constant), homoscedasticity returns.


But Zi can be any value, and it is the proportionality factor.
In the case of 2 was known :To correct the heteroscedasticity
Transform the regression:

Yi 1 X2i X3i ui Then each term


=1 + 2 + 3 + divided by Zi
Zi Zi Zi Zi Zi

=> Y* = 1 X1* + 2 X2* + 3 X3* + ui*


M. Balclar, EMU, ECON 503
10.31
Theoretically, in the transformed equation where
ui 1
(i) E ( Z ) = Z E (ui) = 0
i i

ui 2 1 1
(ii) E ( Z ) = Z 2E (ui ) = Z 2 Zi22 = 2
2
i i i

ui uj 1
(iii) E ( )= E ( ui uj ) = 0
Zi Zj ZiZj

These three results satisfy the assumptions of classical OLS,


therefore, use the Zi as the weight for each regressor can correct
the problem of heteroscedasticity, and can obtain the BLUE
estimators.

Determine to use Zi or Zi as the weight?


M. Balclar, EMU, ECON 503
If the residual plot against X2 is as following : 10.32
^u2i ^u2
i

+
0 X3
-
X3
This plot suggests a variance is increasing proportional to X3i2.
The scattered plots spreading out as nonlinear trumpet pattern.
Therefore, we might expect 2 = Z 22
i iZ 2 = X 2 =>Z =X
i 3i i 3i
Hence, the transformed equation becomes
Yi 1 X2i X3i ui
= 1 + 2 + 3 +
X3i X3i X3i X3i X3i
This becomes
=> Yi* = 1 X1* + 2 X2* + 3 + u* the intercept
Where u*i satisfies the assumptions of classical OLS coefficient
M. Balclar, EMU, ECON 503
Example: Studenmund (2001), Eq. 10.27, pp.373 10.33

M. Balclar, EMU, ECON 503


10.34

M. Balclar, EMU, ECON 503


10.35

Refers to Studenmund (2001), Eq.(10.31), pp.375


M. Balclar, EMU, ECON 503
Alternative remedy of heteroscedasiticty: Weighted log-log model 10.36

M. Balclar, EMU, ECON 503


10.37

2(0.05, 6) = 12.59
W< not reject Ho
2(0.10, 6) = 10.64

M. Balclar, EMU, ECON 503


If the residual plot against X2 is as following : 10.38
^ui ^u2
i

+
0 X3
-

X3
This plot suggests a variance is increasing proportional to X3i.
The scattered plots spreading out as a linear cone pattern
Therefore, we might expect i2 = Zi2 hi2 = X3i => hi = X3i
The transformed equation is
Yi 1 X2i X3i ui
= 1 + 2 + 3 +
X3i X3i X3i X3i X3i

=> Yi* = 1 X1* + 2 X2* + 3 X3* + u*


M. Balclar, EMU, ECON 503
10.39
Simple OLS result :(Gujarati(2003), Example 11.10. pp.424)
R&D = 192.99 + 0.0319 Sales SEE = 2759
t = (0.194) (3.830) R2=0.478 C.V. = 0.9026

M. Balclar, EMU, ECON 503


10.40
White Test for heteroscedasticity

W < 2(0.05, 2)= 5.9914  not reject Ho


W > 2(0.10, 2) = 4.6051  reject Ho

M. Balclar, EMU, ECON 503


10.41
A bell shape pattern of residuals:

M. Balclar, EMU, ECON 503


10.42
Transformation equations:

^
1. Yi 1
( ) = -246.67 + 0.0367 Xi
Xi Xi
(-0.64) (5.17) C.V. = 0.8195
=>(1) ^
R&D = -246.67 + 0.036 Sales SEE = 7.25
i
(-0.64) (5.17) R2 = 0.3648

Yi 1 Xi Compare the C.V.


2.
( ) = 1 + 2 To determine which
Xi Xi Xi weight is appropriated
^
(2) R&D = -243.49 + 0.0366 Sales SEE = 0.021
(-1.79) (5.52) R2 = 0.168
M. Balclar, EMU, ECON 503 C.V. = 0.7467
10.43

^
Yi 1
= 1 +2 Xi
Xi Xi

C.V. = 0.8195
M. Balclar, EMU, ECON 503
10.44
After transformation by @sqrt(x), residuals still spread out wider

M. Balclar, EMU, ECON 503


10.45

^
Yi 1
= 1 + 2
Xi Xi

C.V. = 0.7467
M. Balclar, EMU, ECON 503
10.46
After transformation by Xi, residuals spread out more stable

M. Balclar, EMU, ECON 503


10.47
S c a tte r P lo t o f C o rru p tio n a n d G D P p e r C a p ita
60000
(1 3 3 C o u n trie s )

50000

40000
PERGDP

30000

20000

10000

0
1 2 3 4 5 6 7 8 9 10

CO RRUPT ION
M. Balclar, EMU, ECON 503
10.48

2(0.05, 2)= 5.9914


2(0.10, 2)= 4.60517

Since W* > 2  reject Ho


Heteroscedasticity is existed

M. Balclar, EMU, ECON 503


Change the function form as the log-linear model 10.49

M. Balclar, EMU, ECON 503


10.50

2(0.05, 2)= 5.9914


2(0.10, 2)= 4.60517

W* < 2(0.05,2) not reject Ho

It means there is no more heterscedasticity


problem after the change of functional
Form.

M. Balclar, EMU, ECON 503


10.51

If after the White test, the result


still shows the heteroscedasticity
problem, then you should try
the weighted least square (WLS)
method to remedy it

M. Balclar, EMU, ECON 503

You might also like