Вы находитесь на странице: 1из 4

2014/5/15

1
Econometrics I, Lecture 10
Thu, 15 May 2014
Yasushi Kondo
Heteroskedasticity is known up to a multiplicative
constant
(8.21)
Example: Savings function (8.22), (8.23)
Example: Group data
Per capita V(u|x) inv. proportional to population
Total V(u|x) proportional to population
8.4 Weighted least squares estimation
2
vai(u|x) = o
2
(x)
so:
i
= [
u
+[
1
inc
i
+u
i

vai(u
i
|inc
i
) = o
2
inc
i

8.4 Weighted least squares estimation
3
Eqs. (8.24)(8.26)
Scaled error terms are homoskedastic;
WLS (regressing y

on x

s w/o intercept) is a GLS


x should be estimated, Feasible GLS
Pages 276278
y
i
= [
u
+ [
1
x
i1
++[
k
x
ik
+u
i
, vai(u
i
|x
i
) = o
2

i

y
i

i
= [
u
1

i
+[
1
x
i1

i
++[
k
x
ik

i
+
u
i

i

y
i

= [
u
x
iu

+[
1
x
i1

++ [
k
x
ik

+u
i

, vai(u
i

|x
i
) = o
2
WLS as Feasible GLS (Pages 276278)
4
x should be estimated, Feasible GLS
Regression of
log u

2
is preferred because it always provides positive
estimates of variances.
u
i
2
on x
i1
, x
i2
, , x
ik
to get

i

log(u
i
2
) on x
i1
, x
i2
, , x
ik
to get g
i
,

i
= exp(g
i
)
log(u
i
2
) on y
i
, y
i
2
to get g
i
,

i
= exp(g
i
)
Example 8.7 Demand for Cigarettes
5
. use smoke.dta, clear
. regress cigs lincome lcigpric educ age agesq restaurn
Source | SS df MS Number of obs = 807
-------------+------------------------------ F( 6, 800) = 7.42
Model | 8003.02506 6 1333.83751 Prob > F = 0.0000
Residual | 143750.658 800 179.688322 R-squared = 0.0527
-------------+------------------------------ Adj R-squared = 0.0456
Total | 151753.683 806 188.280003 Root MSE = 13.405
------------------------------------------------------------------------------
cigs | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
lincome | .8802682 .7277832 1.21 0.227 -.548322 2.308858
lcigpric | -.7508586 5.773343 -0.13 0.897 -12.08355 10.58183
educ | -.5014982 .1670772 -3.00 0.003 -.8294597 -.1735368
age | .7706936 .1601223 4.81 0.000 .456384 1.085003
agesq | -.0090228 .001743 -5.18 0.000 -.0124443 -.0056013
restaurn | -2.825085 1.111794 -2.54 0.011 -5.007462 -.6427078
_cons | -3.639841 24.07866 -0.15 0.880 -50.90466 43.62497
------------------------------------------------------------------------------
Example 8.7 Demand for Cigarettes
6
. predict uhat, residuals
. generate log_uhatsq = log(uhat^2)
. regress log_uhatsq lincome lcigpric educ age agesq restaurn,
notable noheader
. predict ghat, xb
. generate hhat = exp(ghat)
2014/5/15
2
Example 8.7 Demand for Cigarettes
7
. regress cigs lincome lcigpric educ age agesq restaurn
[aweight=1/hhat]
(sum of wgt is 1.9977e+01)
Source | SS df MS Number of obs = 807
-------------+------------------------------ F( 6, 800) = 17.06
Model | 10302.646 6 1717.10767 Prob > F = 0.0000
Residual | 80542.159 800 100.677699 R-squared = 0.1134
-------------+------------------------------ Adj R-squared = 0.1068
Total | 90844.805 806 112.710676 Root MSE = 10.034
------------------------------------------------------------------------------
cigs | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
lincome | 1.29524 .4370118 2.96 0.003 .4374148 2.153065
lcigpric | -2.940312 4.460144 -0.66 0.510 -11.69528 5.814656
educ | -.4634463 .1201587 -3.86 0.000 -.6993099 -.2275828
age | .4819479 .0968082 4.98 0.000 .2919197 .671976
agesq | -.0056272 .0009395 -5.99 0.000 -.0074713 -.0037831
restaurn | -3.461064 .795505 -4.35 0.000 -5.022588 -1.899541
_cons | 5.635463 17.80314 0.32 0.752 -29.31092 40.58184
------------------------------------------------------------------------------
Weighted least squares in matrix form
8
Assumed structure of heteroskedasticity
vai u

X = o
2

vai u X = o
2
H (H is diagonal)
WLS as GLS

OLS
= X
i
X
-1
X
i
y

WLS
= X
i
H
-1
X
-1
X
i
H
-1
y
y
i
= [
u
+ [
1
x
i1
++[
k
x
ik
+u
i
, vai(u
i
|x
i
) = o
2

i

y
i

i
= [
u
1

i
+[
1
x
i1

i
++[
k
x
ik

i
+
u
i

i

Weighted least squares in matrix form
9
True structure of heteroskedasticity
vai u

X = o
2

vai u X = o
2
u (u is diagonal)
Variance matrix of WLSE

WLS
= +(X

H
1
X)
1
X

H
1
u
vai(

WLS
|X) = o
2
(X

H
1
X)
1
X

H
1
uH
1
X(X

H
1
X)
1
= o
2
(X

H
1
X)
1
(if H = u)
Use an estimate of this form because the assumption of heteroskedasticity
may not be true.
The last command in the Stata example should be followed by robust option
regress cigs lincome lcigpric educ age agesq restaurn [aweight=1/hhat], robust
WLS vs OLS
10
The WLS and OLS estimates may be substantially
different, although both estimators are consistent
May indicate that E(y|x) is misspecified
Recommended:
Draw Residual-Fitted value plot
Perform BP and/or White tests
OLS/WLS with Robust SE
OLS with Robust SE is much more popular than WLS with Robust SE.
However, WLS (w/ Robust SE) is preferred in the case of strong
heteroskedasticity.
WLS is expected to be more efficient than OLS.
8.5 The Linear Probability Model Revisited
11
Binary response, y u,1
Linear probability model
y = [
0
+ [
1
x
1
++[
k
x
k
+ u = x +u
p x = P y = 1 x = E y x = x +u
Heteroskedasticity
vai u x = p x 1 p x
Estimation of skedastic function
y

= x

= y

1 y

Some modifications may be necessary if y

u,1
OLS w/ robust SE, WLS w/o (or w/) robust SE
Ch. 9. More on specification and data issues
12
9.1 Functional form misspecification
9.2 Using proxy variables for unobserved explanatory
variables
9.3 Models with random slopes
9.4 Properties of OLS under measurement error
9.5 Missing data, nonrandom samples, and outlying
observations
9.6 Least absolute deviations estimation
2014/5/15
3
9.1 Functional form misspecification
13
Linear vs quadratic in xs? y vs log y ?
RESET (regression specification error test)
Ramsey (1969, JRSS-B)
H0: (9.2) H0: y = x +u is true, H1: not H0
(9.2) Regress y on xs to get y
(9.3) Regress y on xs and y
2
, y
3
F-test for the significance of y
2
, y
3
Can detect general Functional misspecification
Not suitable for detecting general omitted variables
Example 9.2 (HPRICE1.WF1)
14
level-level specification
House price regressed
on lot size, floor space,
And # of bedrooms.
Example 9.2 (HPRICE1.WF1)
15
Post-estimation
View > Stability Diagnostics
> Ramsey RESET Test
# of terms = 2
y
2
and y
3
are used
Example 9.2 (HPRICE1.WF1)
16
9.2 Using proxy variables for unobserved
explanatory variables
17
Examples
observed or lagged value as a proxy for expected value
(adaptive/rational expectations)
lagged dependent variable to account for historical factors
ability affects wage; IQ as a proxy for ability
Assumptions: Good proxy
E(u|cJuc, cxpcr, obil) = u, E(u|I) = u
E(obil|cJuc, cxpcr, I) = E(obil|I) = o
u
+o
1
I
log(wogc) = [
u
+[
1
cJuc +[
2
cxpcr +[
S
obil +u
obil = o
u
+o
1
I + :
9.2 Using proxy variables for unobserved
explanatory variables
18
Plug-in solution to the omitted variables problem
Under the good-proxy assumptions,
OLSE of [
1
and [
2
are consistent
Slope on I is different from that on obil, which cannot be
consistently estimated
log(wogc) = [
u
+[
1
cJuc + [
2
cxpcr +[
S
obil +u
obil = o
u
+ o
1
I +:
log(wogc) = [
u

+[
1
cJuc + [
2
cxpcr +[
S

I +u


[
u

= [
u
+[
S
o
u
, [
S

= [
S
o
1
, u

= u +[
S
:
2014/5/15
4
9.4 Properties of OLS under measurement
error
19
Measurement error in dependent variable
The measurement error is uncorrelated with independent
variables.
OLSE is consistent, but its variance is larger
under the (additional) assumption
y

= [
u
+[
1
x
1
+u
y = y

+c
u

y = [
u
+[
1
x
1
+ u

, u

= u + c
u

E(c
u
|x
1
) = u
9.4 Properties of OLS under measurement
error
20
Measurement error in an independent variable
Classical errors-in-variables: OLSE is inconsistent even
when the measurement error (c
1
) is uncorrelated with
unobserved variable (x
1

). (9.33)
y = [
u
+[
1
x
1

+ u, x
1
= x
1

+c
1

y = [
u
+[
1
x
1
+ u

, u

= u [
1
c
1

Cov(x
1

, c
1
) = u Cov(x
1
, u

) = [
1
o
c
1
2
Unobserved variable
Measurement error
Observed variable w/ error
9.4 Properties of OLS under measurement
error
21
Results of the classical errors-in-variables
(9.33), p. 311
Estimated OLS effect is weakened
Attenuation bias
plim([
`
1
) = [
1
+
Cov(x
1
, u

)
vai(x
1
)
= [
1

[
1
o
c
1
2
o
x
1

2
+o
c
1
2
= [
1
_
o
x
1

2
o
x
1

2
+o
c
1
2
_
Homework assignments
22
Computer Exercise C1, Chapter 9
Computer Exercise C1: (i) Apply RESET from equation (9.3) to
the model estimated in Computer Exercise C5 in Chapter 7
This is C9.1 in the 4th intl ed.

Вам также может понравиться