15
Christopher Dougherty EC220 - Introduction to econometrics (chapter 7) Slideshow: heteroscedasticity: Monte Carlo illustration Original citation: Dougherty, C. (2012) EC220 - Introduction to econometrics (chapter 7). [Teaching Resource] © 2012 The Author This version available at: http://learningresources.lse.ac.uk/133/ Available in LSE Learning Resources Online: May 2012 This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 License. This license allows the user to remix, tweak, and build upon the work even for commercial purposes, as long as the user credits the author and licenses their new creations under the identical terms. http://creativecommons.org/licenses/by-sa/3.0/ http://learningresources.lse.ac.uk/

Christopher Dougherty EC220 - Introduction to econometrics (chapter 7) Slideshow: heteroscedasticity: Monte Carlo illustration Original citation: Dougherty,

Embed Size (px)

Citation preview

Christopher Dougherty

EC220 - Introduction to econometrics (chapter 7)Slideshow: heteroscedasticity: Monte Carlo illustration

 

 

 

 

Original citation:

Dougherty, C. (2012) EC220 - Introduction to econometrics (chapter 7). [Teaching Resource]

© 2012 The Author

This version available at: http://learningresources.lse.ac.uk/133/

Available in LSE Learning Resources Online: May 2012

This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 License. This license allows the user to remix, tweak, and build upon the work even for commercial purposes, as long as the user credits the author and licenses their new creations under the identical terms. http://creativecommons.org/licenses/by-sa/3.0/

 

 http://learningresources.lse.ac.uk/

1

We will illustrate the heteroscedasticity theory with a Monte Carlo simulation in which Y = 10 + 2X, the data for X are the integers from 5 to 54, and u = X, where is iid N(0,1) (identically and independently distributed, drawn from a normal distribution with zero mean and unit variance).

HETEROSCEDASTICITY: MONTE CARLO ILLUSTRATION

Yi = 10 + 2.0Xi + ui Xi = {5,6, ..., 54} ui = Xii i ~ N(0,1)

0

20

40

60

80

100

120

140

160

180

0 10 20 30 40 50

1 standarddeviation of u

2

The blue circles give the nonstochastic component of Y in the observations. The lines give the points one standard deviation of u above and below the nonstochastic component of Y and show how the distribution of Y spreads in the vertical dimension as X increases.

HETEROSCEDASTICITY: MONTE CARLO ILLUSTRATION

Yi = 10 + 2.0Xi + ui Xi = {5,6, ..., 54} ui = Xii i ~ N(0,1)

0

20

40

60

80

100

120

140

160

180

0 10 20 30 40 50

1 standarddeviation of u

3

The standard deviation of ui is equal to Xi. The heteroscedasticity is thus of the type detected by the Goldfeld–Quandt test and it may be eliminated using weighted least squares (WLS). We scale through by X, weighting observation i by multiplying it by 1/Xi.

HETEROSCEDASTICITY: MONTE CARLO ILLUSTRATION

Yi = 10 + 2.0Xi + ui Xi = {5,6, ..., 54} ui = Xii i ~ N(0,1)

0

20

40

60

80

100

120

140

160

180

0 10 20 30 40 50

1 standarddeviation of u

4

The diagram shows the results of estimating the slope coefficient using WLS and OLS for one million samples.

HETEROSCEDASTICITY: MONTE CARLO ILLUSTRATION

0

0.5

1

1.5

2

0 0.5 1 1.5 2 2.5 3 3.5 4

Yi = 10 + 2.0Xi + ui Xi = {5,6, ..., 54} ui = Xii i ~ N(0,1)

Slope coefficient estimated using WLS Yi /Xi = 10/Xi + 2.0 + i s.d. = 0.227

Slope coefficient estimated using OLS s.d. = 0.346

1 million samples

5

Both OLS and WLS are unbiased, but the distribution of the WLS estimates has a smaller variance. This illustrates the fact that OLS is inefficient in the presence of heteroscedasticity.

HETEROSCEDASTICITY: MONTE CARLO ILLUSTRATION

0

0.5

1

1.5

2

0 0.5 1 1.5 2 2.5 3 3.5 4

Yi = 10 + 2.0Xi + ui Xi = {5,6, ..., 54} ui = Xii i ~ N(0,1)

Slope coefficient estimated using WLS Yi /Xi = 10/Xi + 2.0 + i s.d. = 0.227

Slope coefficient estimated using OLS s.d. = 0.346

1 million samples

0

2

4

6

8

10

12

14

16

18

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7

6

Heteroscedasticity also causes the OLS standard error to be invalidated. The diagram shows the distributions of the OLS and WLS standard errors of the slope coefficient for the million samples.

HETEROSCEDASTICITY: MONTE CARLO ILLUSTRATION

Yi = 10 + 2.0Xi + ui Xi = {5,6, ..., 54} ui = Xii i ~ N(0,1)

1 million samplesS.e. estimated using WLSMean of distribution = 0.226Actual s.d. = 0.227

S.e. estimated using OLSMean of distribution = 0.319Actual s.d. = 0.346

0

2

4

6

8

10

12

14

16

18

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7

7

The standard deviation of the distribution of the WLS estimates of the slope coefficient in the first slide was 0.227, and we can see that the WLS standard errors in the million samples are distributed around this figure.

HETEROSCEDASTICITY: MONTE CARLO ILLUSTRATION

Yi = 10 + 2.0Xi + ui Xi = {5,6, ..., 54} ui = Xii i ~ N(0,1)

1 million samplesS.e. estimated using WLSMean of distribution = 0.226Actual s.d. = 0.227

S.e. estimated using OLSMean of distribution = 0.319Actual s.d. = 0.346

0

2

4

6

8

10

12

14

16

18

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7

8

Sometimes the WLS standard error overestimates the underlying standard deviation of the distribution of the slope coefficient, sometimes it underestimates it, but there is no evident bias.

HETEROSCEDASTICITY: MONTE CARLO ILLUSTRATION

Yi = 10 + 2.0Xi + ui Xi = {5,6, ..., 54} ui = Xii i ~ N(0,1)

1 million samplesS.e. estimated using WLSMean of distribution = 0.226Actual s.d. = 0.227

S.e. estimated using OLSMean of distribution = 0.319Actual s.d. = 0.346

0

2

4

6

8

10

12

14

16

18

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7

9

The standard deviation of the distribution of the OLS estimates of the slope coefficient in the first slide was 0.346, and we can see that the OLS standard error is downwards biased. The mean of its distribution in the million samples is 0.319.

HETEROSCEDASTICITY: MONTE CARLO ILLUSTRATION

Yi = 10 + 2.0Xi + ui Xi = {5,6, ..., 54} ui = Xii i ~ N(0,1)

1 million samplesS.e. estimated using WLSMean of distribution = 0.226Actual s.d. = 0.227

S.e. estimated using OLSMean of distribution = 0.319Actual s.d. = 0.346

0

2

4

6

8

10

12

14

16

18

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7

10

Because the OLS standard error is downwards biased, the OLS t statistic will tend to be higher than it should be. What happens if we use heteroscedasticity-consistent, or robust, standard errors instead?

HETEROSCEDASTICITY: MONTE CARLO ILLUSTRATION

Yi = 10 + 2.0Xi + ui Xi = {5,6, ..., 54} ui = Xii i ~ N(0,1)

1 million samplesS.e. estimated using WLSMean of distribution = 0.226Actual s.d. = 0.227

S.e. estimated using OLSMean of distribution = 0.319Actual s.d. = 0.346

Yi = 10 + 2.0Xi + ui Xi = {5,6, ..., 54} ui = Xii i ~ N(0,1)

0

2

4

6

8

10

12

14

16

18

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7

11

The mean of the distribution of the robust standard errors is 0.335. This is closer to the true standard deviation, 0.346. But the dispersion of the robust standard errors is larger. Hence, in this case, it is not clear that the robust standard errors are actually more reliable.

HETEROSCEDASTICITY: MONTE CARLO ILLUSTRATION

S.e. estimated using WLSMean of distribution = 0.226Actual s.d. = 0.227

1 million samples

S.e. estimated using OLSMean of distribution = 0.319Actual s.d. = 0.346

Robust s.e. estimated using OLSMean of distribution = 0.335Actual s.d. = 0.346

Yi = 10 + 2.0Xi + ui Xi = {5,6, ..., 54} ui = Xii i ~ N(0,1)

0

2

4

6

8

10

12

14

16

18

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7

12

Robust standard errors are valid only in large samples. For small samples, their properties are unknown and they could actually be more misleading than the ordinary OLS standard errors.

HETEROSCEDASTICITY: MONTE CARLO ILLUSTRATION

S.e. estimated using WLSMean of distribution = 0.226Actual s.d. = 0.227

1 million samples

S.e. estimated using OLSMean of distribution = 0.319Actual s.d. = 0.346

Robust s.e. estimated using OLSMean of distribution = 0.335Actual s.d. = 0.346

Yi = 10 + 2.0Xi + ui Xi = {5,6, ..., 54} ui = Xii i ~ N(0,1)

0

2

4

6

8

10

12

14

16

18

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7

13

We could investigate this In the case of the present model by making the sample larger or smaller than the 50 observations used in each sample in this simulation.

HETEROSCEDASTICITY: MONTE CARLO ILLUSTRATION

S.e. estimated using WLSMean of distribution = 0.226Actual s.d. = 0.227

1 million samples

S.e. estimated using OLSMean of distribution = 0.319Actual s.d. = 0.346

Robust s.e. estimated using OLSMean of distribution = 0.335Actual s.d. = 0.346

Copyright Christopher Dougherty 2011.

These slideshows may be downloaded by anyone, anywhere for personal use.

Subject to respect for copyright and, where appropriate, attribution, they may be

used as a resource for teaching an econometrics course. There is no need to

refer to the author.

The content of this slideshow comes from Section 7.3 of C. Dougherty,

Introduction to Econometrics, fourth edition 2011, Oxford University Press.

Additional (free) resources for both students and instructors may be

downloaded from the OUP Online Resource Centre

http://www.oup.com/uk/orc/bin/9780199567089/.

Individuals studying econometrics on their own and who feel that they might

benefit from participation in a formal course should consider the London School

of Economics summer school course

EC212 Introduction to Econometrics

http://www2.lse.ac.uk/study/summerSchools/summerSchool/Home.aspx

or the University of London International Programmes distance learning course

20 Elements of Econometrics

www.londoninternational.ac.uk/lse.

11.07.25