Presentation is loading. Please wait.

Presentation is loading. Please wait.

Heteroskedasticity ECON 6002 Econometrics Memorial University of Newfoundland Adapted from Vera Tabakova’s notes.

Similar presentations


Presentation on theme: "Heteroskedasticity ECON 6002 Econometrics Memorial University of Newfoundland Adapted from Vera Tabakova’s notes."— Presentation transcript:

1 Heteroskedasticity ECON 6002 Econometrics Memorial University of Newfoundland Adapted from Vera Tabakova’s notes

2  8.1 The Nature of Heteroskedasticity  8.2 Using the Least Squares Estimator  8.3 The Generalized Least Squares Estimator  8.4 Detecting Heteroskedasticity

3

4 Figure 8.1 Heteroskedastic Errors

5 Food expenditure example:

6 Figure 8.2 Least Squares Estimated Expenditure Function and Observed Data Points

7 The existence of heteroskedasticity implies:  The least squares estimator is still a linear and unbiased estimator, but it is no longer best. There is another estimator with a smaller variance.  The standard errors usually computed for the least squares estimator are incorrect. Confidence intervals and hypothesis tests that use these standard errors may be misleading.

8

9

10 We can use a robust estimator: regress food_exp income, robust

11

12

13

14 To obtain the best linear unbiased estimator for a model with heteroskedasticity of the type specified in equation (8.11): 1. Calculate the transformed variables given in (8.13). 2. Use least squares to estimate the transformed model given in (8.14).

15 The generalized least squares estimator is as a weighted least squares estimator. Minimizing the sum of squared transformed errors that is given by: When is small, the data contain more information about the regression function and the observations are weighted heavily. When is large, the data contain less information and the observations are weighted lightly.

16 Food example again, where was the problem coming from? regress food_exp income [aweight = 1/income]

17

18

19

20

21

22 The steps for obtaining a feasible generalized least squares estimator for are:  1.Estimate (8.25) by least squares and compute the squares of the least squares residuals.  2.Estimate by applying least squares to the equation

23 3.Compute variance estimates. 4.Compute the transformed observations defined by (8.23), including if. 5.Apply least squares to (8.24), or to an extended version of (8.24) if.

24 For our food expenditure example: gen z = log(income) regress food_exp income predict ehat, residual gen lnehat2 = log(ehat*ehat) regress lnehat2 z * -------------------------------------------- * Feasible GLS * -------------------------------------------- predict sig2, xb gen wt = exp(sig2) regress food_exp income [aweight = 1/wt]

25 Using our wage data (cps2.dta): ???

26

27

28 Feasible generalized least squares: 1.Obtain estimated and by applying least squares separately to the metropolitan and rural observations. 2. 3.Apply least squares to the transformed model

29

30 * -------------------------------------------- * Rural subsample regression * -------------------------------------------- regress wage educ exper if metro == 0 scalar rmse_r = e(rmse) scalar df_r = e(df_r) * -------------------------------------------- * Urban subsample regression * -------------------------------------------- regress wage educ exper if metro == 1 scalar rmse_m = e(rmse) scalar df_m = e(df_r) * -------------------------------------------- * Groupwise heteroskedastic regression using FGLS * -------------------------------------------- gen rural = 1 - metro gen wt=(rmse_r^2*rural) + (rmse_m^2*metro) regress wage educ exper metro [aweight = 1/wt] STATA Commands:

31 Remark: To implement the generalized least squares estimators described in this Section for three alternative heteroskedastic specifications, an assumption about the form of the heteroskedasticity is required. Using least squares with White standard errors avoids the need to make an assumption about the form of heteroskedasticity, but does not realize the potential efficiency gains from generalized least squares.

32 8.4.1Residual Plots  Estimate the model using least squares and plot the least squares residuals.  With more than one explanatory variable, plot the least squares residuals against each explanatory variable, or against, to see if those residuals vary in a systematic way relative to the specified variable.

33 8.4.2The Goldfeld-Quandt Test

34 * -------------------------------------------- * Goldfeld Quandt test * -------------------------------------------- scalar GQ = rmse_m^2/rmse_r^2 scalar crit = invFtail(df_m,df_r,.05) scalar pvalue = Ftail(df_m,df_r,GQ) scalar list GQ pvalue crit

35 8.4.2The Goldfeld-Quandt Test For the food expenditure data You should now be able to obtain this test statistic And check whether it exceeds the critical value

36 8.4.3Testing the Variance Function

37

38

39 8.4.3a The White Test

40 8.4.3b Testing the Food Expenditure Example whitetst Or estat imtest, white

41 Slide 8-41 Principles of Econometrics, 3rd Edition  Breusch-Pagan test  generalized least squares  Goldfeld-Quandt test  heteroskedastic partition  heteroskedasticity  heteroskedasticity-consistent standard errors  homoskedasticity  Lagrange multiplier test  mean function  residual plot  transformed model  variance function  weighted least squares  White test

42 Slide 8-42 Principles of Econometrics, 3rd Edition

43 Slide 8-43 Principles of Econometrics, 3rd Edition (8A.1)

44 Slide 8-44 Principles of Econometrics, 3rd Edition

45 Slide 8-45 Principles of Econometrics, 3rd Edition (8A.2)

46 Slide 8-46 Principles of Econometrics, 3rd Edition (8A.3)

47 Slide 8-47 Principles of Econometrics, 3rd Edition (8B.2) (8B.1)

48 Slide 8-48 Principles of Econometrics, 3rd Edition (8B.4) (8B.3) (8B.5)

49 Slide 8-49 Principles of Econometrics, 3rd Edition (8B.6) (8B.7)

50 Slide 8-50 Principles of Econometrics, 3rd Edition (8B.8)


Download ppt "Heteroskedasticity ECON 6002 Econometrics Memorial University of Newfoundland Adapted from Vera Tabakova’s notes."

Similar presentations


Ads by Google