2 - HKBU

Lecture #10
Studenmund (2006): Chapter 10
Objectives
• What is heteroscedasticity?
• What are the consequences?
• How is heteroscedasticity be identified?
• How is heteroscedasticity be corrected?
All right reserved by Dr.Bill Wan Sing Hung - HKBU
10.1
10.2
Homoscedasticity Case
f(Yi)
.
.
.
Var(i) = E(i2)= 2
x11=80 x12=90
x13=10
0
income
x1i
The probability density function for Yi at three different
levels of family income, X1 i , are identical.
All right reserved by Dr.Bill Wan Sing Hung - HKBU
10.3
Homoscedastic pattern of errors
yi
.
.
.
.
.
.
.
.
.
.
.
.
.
.
. ..
.
.
.
..
.
.
.
.
.
.
.
.
.
. . . . .
..
. .
.
0
The scattered points spread out quite equally
All right reserved by Dr.Bill Wan Sing Hung - HKBU
xi
10.4
Heteroscedasticity Case
f(Yi)
.
.
x11
x12
.
Var(i) = E(i2)= i2
x13
income
x1i
The variance of Yi increases as family income,
X1i, increases.
All right reserved by Dr.Bill Wan Sing Hung - HKBU
Heteroscedastic pattern of errors
10.5
.
yi
.
.
.
.
. . .
. .
. .
.
.
. .
.
.
.
.
. .. . .
.
.
.
.
.
.
.
.
.
. .
.
.
.
. . . .
.
. .
Small i
associated with
small value of Xi
0
The scattered points spread out quite unequally
All right reserved by Dr.Bill Wan Sing Hung - HKBU
large i
associated with
large value of Xi
xi
Definition of Heteroscedasticity:
Var(i) =
E(i2)
=
i2
Two-variable regression: Yi = 0 +  1 X1i + i
 xy
^
1=
=  wi Yi = wi (0 + 1Xi + i)
 x2

2
10.6
Refer to
lecture notes
Supplement #03A
^ ) =  unbiased
^ =  + w 
=> 
E(
1
1
i i
1
1
Var (^1) = E (^1 - 1)2 = E (wi i)2
= E (w12 12 + w22 22 + …. + 2w1w2 1 2 + …)
= w12 12 + w22 22 + … …..+ 0 + ...
= i2  wi2
=
 i2
 x2
( xi2)2
=
if 12  22  32  …
i.e., heteroscedasticity
 i2
 x i2
^
Var (1) =
2
 xi2
All right reserved by Dr.Bill Wan Sing Hung - HKBU
if 12 = 22 = 32 = …
i.e., homoscedasticity
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
2

2
i
^
^
Two-variable
3. Var ( 1) =
instead
of
Var(

)=
1
x2
x2
case
^i2
^2
^2)  2
4.  = n-k-1 is biased, E(
5. t and F statistics are unreliable.
^ RSS =  ^
SEE = 
2
Y =  0+  1 X + 
i
Cannot be min.
All right reserved by Dr.Bill Wan Sing Hung - HKBU
10.8
Detection of heteroscedasticity
1. Graphical method :
plot the estimated residual ( ^i ) or squared (^i 2 ) against the
^ ) or any independent
predicted dependent Variable (Y
i
variable(Xi).
Observe the graph whether there is a systematic pattern as:
^ 2
Yes,
heteroscedasticity exists
^
Y
All right reserved by Dr.Bill Wan Sing Hung - HKBU
10.9
Detection of heteroscedasticity: Graphical method
^ 2
^ 2
yes
yes
^
Y
^2
yes
^
Y
^2
^
Y
^ 2
yes
yes
^
Y
^ 2
no heteroscedasticity
^
Y
All right reserved by Dr.Bill Wan Sing Hung - HKBU
^
Y
10.10
Yes, heteroscedasticity
Yes, heteroscedasticity
Yes, heteroscedasticity
no heteroscedasticity
All right reserved by Dr.Bill Wan Sing Hung - HKBU
10.11
Statistical test: (i) Park test
H0 : No heteroscedasticity exists
(homoscedasticity)
i.e.,
Var( i ) = 2
H1 : Yes, heteroscedasticity exists
i.e.,
Var( i ) = i2
Park test procedures:
1. Run OLS on regression: Yi = 1 + 2 Xi + i , obtain ^i
2. Take square and take log : ln ( ^i2)
3. Run OLS on regression:
ln ( ^
i2) = 1* + 2* ln Xi + vi
4. Use t-test to test H0 : 2* = 0 (Homoscedasticity)
Suspected variable
that causes
heteroscedasticity
If t* > tc ==> reject H0
==> heteroscedasticity exists
If t* < tc ==> not reject H0
==> homoscedasticity
All right reserved by Dr.Bill Wan Sing Hung - HKBU
10.12
Example: Studenmund (2006), Equation 10.21 (Table 10.1), pp.370-1
PCON: petroleum consumption
in the ith state
REG: motor vehicle registration
TAX: the gasoline tax rate
Park Test
Practical
In EVIEWS
Procedure 1:
May misleading
All right reserved by Dr.Bill Wan Sing Hung - HKBU
Graphical detection
All right reserved by Dr.Bill Wan Sing Hung - HKBU
10.13
Procedure 2:
Obtain the residuals, take square and take log
All right reserved by Dr.Bill Wan Sing Hung - HKBU
10.14
Y  Yˆ  ˆ
 Yˆ  Y  ˆ
Horizontal variable
Scatter plot
All right reserved by Dr.Bill Wan Sing Hung - HKBU
10.15
10.16
ˆ vs. EG
2
ˆ
 vs. REG
All right reserved by Dr.Bill Wan Sing Hung - HKBU
10.17
ˆi vs. Yˆ
2
ˆ
 i vs. Yˆ
log(ˆi ) vs. Yˆ
All right reserved by Dr.Bill Wan Sing Hung - HKBU
Procedure 3 & 4
10.18
log(ˆ 2 )  0*  1* REG   *
If | t | > tc => reject H0
=> heteroscedasticity
Refers AlltorightStudenmund
(2006), Eq.(10.23), pp.373
reserved by Dr.Bill Wan Sing Hung - HKBU
10.19
(ii)Breusch-Pagan test, or LM test
H0 : homoscedasticity
H1 : heteroscedasticity
Var ( i ) = 2
Var ( i ) = i2
Test procedures:
(1) Run OLS on regression: Yi = 0 + 1X1i + 2X2i +...+ qXqi + i
obtain the residuals, ^i
(2) Run the auxiliary regression:
^i2 = 0 + 1 X1i + 2X2i +… +qXqi + vi
(3) Compute LM=W=
nR2
Or F=
,
R2u / q
(1 - R2u) / n-k
(4) Compare the W and 2df (where the df is #(q) of regressors in (2))
if W > 2df ==> reject the Ho
if F*> Fcdf ==> reject the Ho
All right reserved by Dr.Bill Wan Sing Hung - HKBU
Yi = 0 + 1X1i + 2X2i + 3X3i + i
All right reserved by Dr.Bill Wan Sing Hung - HKBU
10.20
10.21
FC(0.05, 5, 44) = 2.45
2(0.05, 5) = 11.07
2(0.10, 5) = 9.24
W=
Decision rule: W > 2df ==> reject the Ho
BPG test for a linear model
PCON=0+1REG+2Tax+
The W-statistic indicates that
the heteroscedasticity is existed.
All right reserved by Dr.Bill Wan Sing Hung - HKBU
10.22
FC(0.05, 5, 44) = 2.45
2(0.05, 5) = 11.07
2(0.10, 5) = 9.24
W=
Decision rule: W > 2df ==> reject the Ho
The BPG test for a transformed log-log model:
log(PCON)=0+1log(REG)+2log(Tax)+
The W-statistic indicates
that the heteroscedasticity
is still existed.
Therefore, a double-log
transformation may not
necessarily remedy the
Heterocsedasticity.
All right reserved by Dr.Bill Wan Sing Hung - HKBU
(iiia) White’s general heteroscedasticity test (no cross-term)
(The White Test)
H0 : homoscedasticity
H1 : heteroscedasticity
10.23
Var ( i ) = 2
Var ( i ) = i2
Test procedures:
(1) Run OLS on regression: Yi = 0 + 1 X1i +  2 X2i + i
obtain the residuals, ^i
,
(2) Run the auxiliary regression:
^i2 = 0 + 1 X1i + 2 X2i + 3 X21i + 4 X22i + vi
(3) Compute W (or LM) = nR2
(4) Compare the W and 2df (where the df is # of regressors in (2))
if W > 2df ==> reject the Ho
All right reserved by Dr.Bill Wan Sing Hung - HKBU
(iiib) White’s general heteroscedasticity test (with cross-terms) 10.24
(The White Test)
H0 : homoscedasticity
H1 : heteroscedasticity
Var ( i ) = 2
Var ( i ) = i2
Test procedures:
(1) Run OLS on regression: Yi = 0 + 1 X1i +  2 X2i + i
obtain the residuals, ^i
,
(2) Run the auxiliary regression:
^i2 = 0 + 1 X1i + 2 X2i + 3 X21i + 4 X22i + 5 X1i X2i + vi
(3) Compute W (or LM) = nR2
Cross-term
(4) Compare the W and 2df (where the df is # of regressors in (2))
if W > 2df ==> reject the Ho
All right reserved by Dr.Bill Wan Sing Hung - HKBU
10.25
No cross-term
All right reserved by Dr.Bill Wan Sing Hung - HKBU
With cross-term
10.26
FC(0.05, 5, 44) = 2.45
2(0.05, 5) = 11.07
2(0.10, 5) = 9.24
W=
Decision rule: W > 2df ==> reject the Ho
White test for a linear model
PCON=0+1REG+2Tax+
The W-statistic indicates that
the heteroscedasticity is existed.
All right reserved by Dr.Bill Wan Sing Hung - HKBU
10.27
FC(0.05, 5, 44) = 2.45
2(0.05, 5) = 11.07
2(0.10, 5) = 9.24
W=
Decision rule: W > 2df ==> reject the Ho
The White test for a transformed log-log model:
log(PCON)=0+1log(REG)+2log(Tax)+
The W-statistic indicates
that the heteroscedasticity
is still existed.
Therefore, a double-log
transformation may not
necessarily remedy the
Heterocsedasticity.
All right reserved by Dr.Bill Wan Sing Hung - HKBU
Another example 8.4 (Wooldridge(2003), pp.258)
10.28
W=
2(0.05, 9) = 16.92
2(0.10, 9) = 14.68
Decision rule: W > 2df => reject the H0
The White test for a linear model
PCON=0+1REG+2Tax+
The test statistic indicates
heteroscedasticity is existed.
All right reserved by Dr.Bill Wan Sing Hung - HKBU
Testing the log-log model
10.29
W=
2(0.05, 9) = 16.92
2(0.10, 9) = 14.68
Decision rule: W < 2df => not reject H0
The White test for a log-log model
The test statistic indicates
heteroscedasticity is not existed
Using the log-log transformation
in some cases may remedy
the heteroscedasticity,
(But not necessary).
All right reserved by Dr.Bill Wan Sing Hung - HKBU
10.30
Remedy :Weighted Least Squares (WLS)
Suppose :
Yi = 0 + 1 X1i + 2 X2i + i
E(i) = 0, E(i j )= 0
ij
Vqr (i2) = i2 = 2 [f (ZX2i)] = 2Zi2
If Var(i2)=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
X1i
X2i
i
=0
+ 1
+ 2
+
Zi
Zi
Zi
Zi
Zi
=> Y* = 0 X0* + 1 X1* + 2 X2* + i*
All right reserved by Dr.Bill Wan Sing Hung - HKBU
Then each term
divided by Zi
10.31
Why the WLS transformation can remove the heteroscedasticity?
In the transformed equation where
1
i
(i) E ( Z ) = Z E (i) = 0
i
i
1
1
i 2
2
(ii) E ( Z ) = Z 2E (i ) = Z 2 Zi22 = 2
i
i
i
(iii) E (
i
Zi
j
)=
Zj
1
E ( i j ) = 0
ZiZj
These three results satisfy the assumptions of classical OLS.
All right reserved by Dr.Bill Wan Sing Hung - HKBU
If the residuals plot against X2i are as following :
^2
^i
+
0
-
10.32
X2
X2
These plots suggest variance is increasing proportional to X2i2.
The scattered plots spreading out as nonlinear pattern.
Therefore, we might expect  2 = Z 22
Z 2 = X 2 =>Z =X
i
i
i
2i
i
2i
Hence, the transformed equation becomes
Yi
1
X1i
= 0
+ 1
X2i
X2i
X2i
X2i
i
+ 2
+
X2i
X2i
=> Yi* = 1 X0* + 2 X1* + 3 + *
Where *i satisfies the assumptions of classical OLS
All right reserved by Dr.Bill Wan Sing Hung - HKBU
Now this
becomes
the intercept
coefficient
Example: Studenmund (2006), Eq. 10.24, pp.374
10.33
C.V.=0.3392
All right reserved by Dr.Bill Wan Sing Hung - HKBU
10.34
The correction is
built in EVIEWS
Use the weight (1/REG)
to remedy the
heteroscedasticity
All right reserved by Dr.Bill Wan Sing Hung - HKBU
10.35
OLS result
WLS result
Refers to Studenmund (2006), Eq.(10.28), pp.376
All right reserved by Dr.Bill Wan Sing Hung - HKBU
10.36
W=
FC(0.05, 5, 44) = 2.45
2(0.05, 5) = 11.07
2(0.10, 5) = 9.24
Decision rule:
W < 2df ==> not reject Ho
Now, after the reformulation
The test statistic value indicates that
the heteroscedasticity is not existed.
All right reserved by Dr.Bill Wan Sing Hung - HKBU
10.37
Alternative remedy of heteroscedasticity: reformulate with per capita
PCONi
REGi
  0  1
  2TAX i   i
POPi
POPi
All right reserved by Dr.Bill Wan Sing Hung - HKBU
10.38
FC(0.05, 5, 44) = 2.45
2(0.05, 5) = 11.07
2(0.10, 5) = 9.24
W=
Decision rule: W < 2df ==> not reject Ho
Now, after the reformulation
The test statistic value indicates that
the heteroscedasticity is not existed.
All right reserved by Dr.Bill Wan Sing Hung - HKBU
10.39
W < 2df => not reject Ho
All right reserved by Dr.Bill Wan Sing Hung - HKBU
If the residuals plot against X2i are as following :
^i
^2
+
0
-
10.40
X2
X2
This plot suggests a variance is increasing proportional to X2i.
The scattered plots spreading out as a linear pattern
Therefore, we might expect
i2 = Zi2
hi2 = X2i => hi = X2i
The transformed equation is
Yi
1
X1i
X2i
i
= 0
+ 1
+ 2
+
X2i
 X2i
 X2i
 X2i  X2i
=> Yi* = 1 X0* + 2 X1* + 3 X2* + *
All right reserved by Dr.Bill Wan Sing Hung - HKBU
Transformation: divided by the squared root term --“@sqrt(X)”10.41
Yi
= 0
X2i
1
+ 1
 X2i
X1i
 X2i
+ 2
X2i
+
 X2i
All right reserved by Dr.Bill Wan Sing Hung - HKBU
i
 X2i
10.42
2(0.05, 5) = 11.07
2(0.10, 5) = 9.24
W < 2df => not reject Ho
calculate: the C.V. = 0.36928
Compare to the transformation
divided by the REG, the CV of
That one is smaller.
All right reserved by Dr.Bill Wan Sing Hung - HKBU
Example: Gujarati (1995), Table 11.5, pp.388
Simple OLS result :
R&D = 192.99 + 0.0319 Sales
(0.194) (3.830)
All right reserved by Dr.Bill Wan Sing Hung - HKBU
SEE = 2759
C.V. = 0.9026
10.43
10.44
White Test for heteroscedasticity
W=
2(0.05, 2)= 5.9914
2(0.10, 2)= 4.60517
All right reserved by Dr.Bill Wan Sing Hung - HKBU
Observe the shape pattern of residuals: linear or nonlinear?
All right reserved by Dr.Bill Wan Sing Hung - HKBU
10.45
Transformation equations:
1.
(
=>(1)
2.
^
Y
i
Xi
^
R&D
i
) = -246.67
(-0.64)
1
Xi
ˆ

2
ˆ
C.V .  , where  
Y
n  k 1
10.46
ˆ 2
+ 0.036 Xi
(5.17)
= -246.67 + 0.036 Sales
(-0.64)
(5.17)
Yi
1
(
) = 0
Xi
Xi
Xi
+ 1
Xi
SEE = 7.25
C.V. = 0.8195
Compare the C.V.
To determine which
weight is appropriated
^
(2) R&D = -243.49 + 0.0369 Sales
(-1.79)
(5.52)
All right reserved by Dr.Bill Wan Sing Hung - HKBU
SEE = 0.021
C.V. = 0.7467
Transformation: divided by the squared root term --“@sqrt(X)”10.47
^
Yi
1
= 0
Xi
Xi
+1 Xi
All right reserved by Dr.Bill Wan Sing Hung - HKBU
10.48
^
Y
1
i

= 0
Xi
Xi
+1 Xi
calculate: the C.V. = 0.8195
All right reserved by Dr.Bill Wan Sing Hung - HKBU
After transformation by @sqrt(x),
the W-statistic indicates there is no heteroscedasticity
10.49
2(0.05, 2)= 5.9914
2(0.10, 2)= 4.60517
W < 2df => not reject Ho
All right reserved by Dr.Bill Wan Sing Hung - HKBU
After transformation by @sqrt(Xi), residuals still spread out
All right reserved by Dr.Bill Wan Sing Hung - HKBU
10.50
Transformation: divided by the suspected variable (Xi)
^
Y
1
i
+ 1
= 0
Xi
Xi
All right reserved by Dr.Bill Wan Sing Hung - HKBU
10.51
10.52
^
Y
i
Xi
= 0
1
Xi
+ 1
Calculate the C.V. = 0.7467
All right reserved by Dr.Bill Wan Sing Hung - HKBU
After transformation divided by the suspected X,
the W-statistic indicates there is no heterose\cedasticity
10.53
2(0.05, 2)= 5.9914
2(0.10, 2)= 4.60517
W < 2df => not reject Ho
All right reserved by Dr.Bill Wan Sing Hung - HKBU
After transformation divided by Xi, residuals spread out more stable10.54
All right reserved by Dr.Bill Wan Sing Hung - HKBU