Download presentation

Presentation is loading. Please wait.

Published byClifton Brunton Modified over 2 years ago

1
Christopher Dougherty EC220 - Introduction to econometrics (chapter 8) Slideshow: Durbin-Wu-Hausman specification test Original citation: Dougherty, C. (2012) EC220 - Introduction to econometrics (chapter 8). [Teaching Resource] © 2012 The Author This version available at: 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.

2
reg LGEARN S EXP ASVABC MALE ETHBLACK ETHHISP Source | SS df MS Number of obs = F( 6, 533) = Model | Prob > F = Residual | R-squared = Adj R-squared = Total | Root MSE = LGEARN | Coef. Std. Err. t P>|t| [95% Conf. Interval] S | EXP | ASVABC | MALE | ETHBLACK | ETHHISP | _cons | DURBIN–WU – HAUSMAN SPECIFICATION TEST When we regressed the logarithm of earnings on years of schooling and other regressors using EAEF Data Set 21, we obtained the output shown above.

3
reg LGEARN S EXP ASVABC MALE ETHBLACK ETHHISP Source | SS df MS Number of obs = F( 6, 533) = Model | Prob > F = Residual | R-squared = Adj R-squared = Total | Root MSE = LGEARN | Coef. Std. Err. t P>|t| [95% Conf. Interval] S | EXP | ASVABC | MALE | ETHBLACK | ETHHISP | _cons | DURBIN–WU – HAUSMAN SPECIFICATION TEST In some data sets the schooling variable is known to be subject to serious measurement error. Sometimes it accounts for as much as 10 percent of the variance in the schooling data.

4
reg LGEARN S EXP ASVABC MALE ETHBLACK ETHHISP Source | SS df MS Number of obs = F( 6, 533) = Model | Prob > F = Residual | R-squared = Adj R-squared = Total | Root MSE = LGEARN | Coef. Std. Err. t P>|t| [95% Conf. Interval] S | EXP | ASVABC | MALE | ETHBLACK | ETHHISP | _cons | DURBIN–WU – HAUSMAN SPECIFICATION TEST If that is the case, the OLS coefficient of schooling will tend to be downwards biased and one should consider using the instrumental variables approach to fit the regression model.

5
4 ivregress 2sls LGEARN EXP ASVABC MALE ETHBLACK ETHHISP (S=SM SF SIBLINGS LIBRARY) Instrumental variables (2SLS) regression Number of obs = 540 Wald chi2(6) = Prob > chi2 = R-squared = Root MSE = LGEARN | Coef. Std. Err. z P>|z| [95% Conf. Interval] S | EXP | ASVABC | MALE | ETHBLACK | ETHHISP | _cons | Instrumented: S Instruments: EXP ASVABC MALE ETHBLACK ETHHISP SM SF SIBLINGS LIBRARY Here we have used SM, mother's years of schooling, SF, father's years of schooling, SIBLINGS, number of brothers and sisters, and LIBRARY, a dummy variable equal to 1 if anyone in the household had a library card and 0 otherwise, to instrument for S. DURBIN–WU – HAUSMAN SPECIFICATION TEST

6
5 ivregress 2sls LGEARN EXP ASVABC MALE ETHBLACK ETHHISP (S=SM SF SIBLINGS LIBRARY) Instrumental variables (2SLS) regression Number of obs = 540 Wald chi2(6) = Prob > chi2 = R-squared = Root MSE = LGEARN | Coef. Std. Err. z P>|z| [95% Conf. Interval] S | EXP | ASVABC | MALE | ETHBLACK | ETHHISP | _cons | Instrumented: S Instruments: EXP ASVABC MALE ETHBLACK ETHHISP SM SF SIBLINGS LIBRARY DURBIN–WU – HAUSMAN SPECIFICATION TEST The Stata command is ' ivregress 2sls ', followed by the dependent variable, then a list of explanatory variables not being instrumented, and finally, in parentheses, the variable(s) being instrumented, followed by an = sign, followed by a list of instruments.

7
6 ivregress 2sls LGEARN EXP ASVABC MALE ETHBLACK ETHHISP (S=SM SF SIBLINGS LIBRARY) Instrumental variables (2SLS) regression Number of obs = 540 Wald chi2(6) = Prob > chi2 = R-squared = Root MSE = LGEARN | Coef. Std. Err. z P>|z| [95% Conf. Interval] S | EXP | ASVABC | MALE | ETHBLACK | ETHHISP | _cons | Instrumented: S Instruments: EXP ASVABC MALE ETHBLACK ETHHISP SM SF SIBLINGS LIBRARY DURBIN–WU – HAUSMAN SPECIFICATION TEST Here we have just one variable being instrumented, S, and four instruments, SM, SF, SIBLINGS, and LIBRARY.

8
7 reg LGEARN S EXP ASVABC MALE ETHBLACK ETHHISP LGEARN | Coef. Std. Err. t P>|t| [95% Conf. Interval] S | ivregress 2sls LGEARN EXP ASVABC MALE ETHBLACK ETHHISP (S=SM SF SIBLINGS LIBRARY) LGEARN | Coef. Std. Err. z P>|z| [95% Conf. Interval] S | The instrumental variable estimate of the schooling coefficient is larger than the OLS one. The reason may be that measurement error in S may indeed be a problem, causing the OLS estimate to be downwards biased. DURBIN–WU – HAUSMAN SPECIFICATION TEST

9
8 reg LGEARN S EXP ASVABC MALE ETHBLACK ETHHISP LGEARN | Coef. Std. Err. t P>|t| [95% Conf. Interval] S | ivregress 2sls LGEARN EXP ASVABC MALE ETHBLACK ETHHISP (S=SM SF SIBLINGS LIBRARY) LGEARN | Coef. Std. Err. z P>|z| [95% Conf. Interval] S | DURBIN–WU – HAUSMAN SPECIFICATION TEST However, another possibility is that the difference is purely random. Note that the IV estimate has a relatively large standard error.

10
9 reg LGEARN S EXP ASVABC MALE ETHBLACK ETHHISP LGEARN | Coef. Std. Err. t P>|t| [95% Conf. Interval] S | ivregress 2sls LGEARN EXP ASVABC MALE ETHBLACK ETHHISP (S=SM SF SIBLINGS LIBRARY) LGEARN | Coef. Std. Err. z P>|z| [95% Conf. Interval] S | DURBIN–WU – HAUSMAN SPECIFICATION TEST This is because SM is only weakly correlated with the instruments. In general, the weaker the correlation between the instrument(s) and the variable being instrumented, the greater is the population variance of the coefficient. cor S SM SF SIBLINGS LIBRARY (obs=540) | S SM SF SIBLINGS LIBRARY S | SM | SF | SIBLINGS | LIBRARY |

11
10 reg LGEARN S EXP ASVABC MALE ETHBLACK ETHHISP LGEARN | Coef. Std. Err. t P>|t| [95% Conf. Interval] S | ivregress 2sls LGEARN EXP ASVABC MALE ETHBLACK ETHHISP (S=SM SF SIBLINGS LIBRARY) LGEARN | Coef. Std. Err. z P>|z| [95% Conf. Interval] S | DURBIN–WU – HAUSMAN SPECIFICATION TEST The Durbin–Wu–Hausman test may enable us to discriminate between these two possibilities.

12
11 ivregress 2sls LGEARN EXP ASVABC MALE ETHBLACK ETHHISP (S=SM SF SIBLINGS LIBRARY) Instrumental variables (2SLS) regression Number of obs = 540 Wald chi2(6) = Prob > chi2 = R-squared = Root MSE = LGEARN | Coef. Std. Err. z P>|z| [95% Conf. Interval] S | EXP | ASVABC | MALE | ETHBLACK | ETHHISP | _cons | Instrumented: S Instruments: EXP ASVABC MALE ETHBLACK ETHHISP SM SF SIBLINGS LIBRARY DURBIN–WU – HAUSMAN SPECIFICATION TEST Here we have just one variable being instrumented, S, and four instruments, SM, SF, SIBLINGS, and LIBRARY.

13
12 ivregress 2sls LGEARN EXP ASVABC MALE ETHBLACK ETHHISP (S=SM SF SIBLINGS LIBRARY) Instrumental variables (2SLS) regression Number of obs = 540 Wald chi2(6) = Prob > chi2 = R-squared = Root MSE = LGEARN | Coef. Std. Err. z P>|z| [95% Conf. Interval] S | EXP | ASVABC | MALE | ETHBLACK | ETHHISP | _cons | Instrumented: S Instruments: EXP ASVABC MALE ETHBLACK ETHHISP SM SF SIBLINGS LIBRARY. estimates store EARNIV DURBIN–WU – HAUSMAN SPECIFICATION TEST To implement the DWH test using Stata, you first run the IV version, and follow with the command ‘ estimates store ‘ followed by a name for the IV regression (here ‘ EARNIV ’).

14
13 You then run the OLS version, and follow with the command ' estimates store ’ followed by a name for the OLS regression (here, ' EARNOLS '). DURBIN–WU – HAUSMAN SPECIFICATION TEST reg LGEARN S EXP ASVABC MALE ETHBLACK ETHHISP Source | SS df MS Number of obs = F( 6, 533) = Model | Prob > F = Residual | R-squared = Adj R-squared = Total | Root MSE = LGEARN | Coef. Std. Err. t P>|t| [95% Conf. Interval] S | EXP | ASVABC | MALE | ETHBLACK | ETHHISP | _cons | estimates store EARNOLS. hausman EARNIV EANOLS, constant

15
14 To perform the test, you give the command ' hausman ’ followed by the name you gave to the IV regression, then the name of the OLS regression, followed by a comma, and then ‘ constant ’, as shown. DURBIN–WU – HAUSMAN SPECIFICATION TEST reg LGEARN S EXP ASVABC MALE ETHBLACK ETHHISP Source | SS df MS Number of obs = F( 6, 533) = Model | Prob > F = Residual | R-squared = Adj R-squared = Total | Root MSE = LGEARN | Coef. Std. Err. t P>|t| [95% Conf. Interval] S | EXP | ASVABC | MALE | ETHBLACK | ETHHISP | _cons | estimates store EARNOLS. hausman EARNIV EARNOLS, constant

16
15 DURBIN–WU – HAUSMAN SPECIFICATION TEST (If the constant does not have the same meaning in the IV and OLS regression, omit the comma and ‘ constant ’. The constant will then not be included in the comparison of the coefficients.) reg LGEARN S EXP ASVABC MALE ETHBLACK ETHHISP Source | SS df MS Number of obs = F( 6, 533) = Model | Prob > F = Residual | R-squared = Adj R-squared = Total | Root MSE = LGEARN | Coef. Std. Err. t P>|t| [95% Conf. Interval] S | EXP | ASVABC | MALE | ETHBLACK | ETHHISP | _cons | estimates store EARNOLS. hausman EARNIV EARNOLS, constant

17
16 The last command produces the test statistics shown above. In the top left corner the IV and OLS estimates of the coefficients are compared. IV is column (b), OLS column (B). DURBIN–WU – HAUSMAN SPECIFICATION TEST ---- Coefficients ---- | (b) (B) (b-B) sqrt(diag(V_b-V_B)) | EARNIV EARNOLS Difference S.E S | EXP | ASVABC | MALE | ETHBLACK | ETHHISP | _cons | b = consistent under Ho and Ha; obtained from ivregress B = inconsistent under Ha, efficient under Ho; obtained from regress Test: Ho: difference in coefficients not systematic chi2(7) = (b-B)'[(V_b-V_B)^(-1)](b-B) = 0.25 Prob>chi2 =

18
17 DURBIN–WU – HAUSMAN SPECIFICATION TEST The null hypothesis is that there is no violation of Assumption B.7. If it is true, there will be no significant difference in the estimates. H 0 : Assumption B.7 is valid ---- Coefficients ---- | (b) (B) (b-B) sqrt(diag(V_b-V_B)) | EARNIV EARNOLS Difference S.E S | EXP | ASVABC | MALE | ETHBLACK | ETHHISP | _cons | b = consistent under Ho and Ha; obtained from ivregress B = inconsistent under Ha, efficient under Ho; obtained from regress Test: Ho: difference in coefficients not systematic chi2(7) = (b-B)'[(V_b-V_B)^(-1)](b-B) = 0.25 Prob>chi2 =

19
18 DURBIN–WU – HAUSMAN SPECIFICATION TEST The IV estimator b will be consistent under both the null hypothesis and the alternative. The OLS estimator B will be consistent (and unbiased), and more efficient than the IV estimator under the null hypothesis, but it will be inconsistent if the null hypothesis is false. H 0 : Assumption B.7 is valid ---- Coefficients ---- | (b) (B) (b-B) sqrt(diag(V_b-V_B)) | EARNIV EARNOLS Difference S.E S | EXP | ASVABC | MALE | ETHBLACK | ETHHISP | _cons | b = consistent under Ho and Ha; obtained from ivregress B = inconsistent under Ha, efficient under Ho; obtained from regress Test: Ho: difference in coefficients not systematic chi2(7) = (b-B)'[(V_b-V_B)^(-1)](b-B) = 0.25 Prob>chi2 =

20
19 DURBIN–WU – HAUSMAN SPECIFICATION TEST If the null hypothesis is true, there was no need to use IV and it is actually undesirable because it will be less efficient than OLS. H 0 : Assumption B.7 is valid ---- Coefficients ---- | (b) (B) (b-B) sqrt(diag(V_b-V_B)) | EARNIV EARNOLS Difference S.E S | EXP | ASVABC | MALE | ETHBLACK | ETHHISP | _cons | b = consistent under Ho and Ha; obtained from ivregress B = inconsistent under Ha, efficient under Ho; obtained from regress Test: Ho: difference in coefficients not systematic chi2(7) = (b-B)'[(V_b-V_B)^(-1)](b-B) = 0.25 Prob>chi2 =

21
20 DURBIN–WU – HAUSMAN SPECIFICATION TEST If the null hypothesis is false, however, IV is preferred because the OLS estimates will be inconsistent. H 0 : Assumption B.7 is valid ---- Coefficients ---- | (b) (B) (b-B) sqrt(diag(V_b-V_B)) | EARNIV EARNOLS Difference S.E S | EXP | ASVABC | MALE | ETHBLACK | ETHHISP | _cons | b = consistent under Ho and Ha; obtained from ivregress B = inconsistent under Ha, efficient under Ho; obtained from regress Test: Ho: difference in coefficients not systematic chi2(7) = (b-B)'[(V_b-V_B)^(-1)](b-B) = 0.25 Prob>chi2 =

22
21 DURBIN–WU – HAUSMAN SPECIFICATION TEST Under the null hypothesis, the test statistic has a chi-squared distribution with degrees of freedom usually equal to the number of coefficients being compared. However under certain conditions the number of degrees of freedom may be smaller. H 0 : Assumption B.7 is valid ---- Coefficients ---- | (b) (B) (b-B) sqrt(diag(V_b-V_B)) | EARNIV EARNOLS Difference S.E S | EXP | ASVABC | MALE | ETHBLACK | ETHHISP | _cons | b = consistent under Ho and Ha; obtained from ivregress B = inconsistent under Ha, efficient under Ho; obtained from regress Test: Ho: difference in coefficients not systematic chi2(7) = (b-B)'[(V_b-V_B)^(-1)](b-B) = 0.25 Prob>chi2 =

23
22 In this case there are 7 degrees of freedom. The test statistic is lower than the critical value of chi-squared at the 5 percent significance level. DURBIN–WU – HAUSMAN SPECIFICATION TEST H 0 : Assumption B.7 is valid ---- Coefficients ---- | (b) (B) (b-B) sqrt(diag(V_b-V_B)) | EARNIV EARNOLS Difference S.E S | EXP | ASVABC | MALE | ETHBLACK | ETHHISP | _cons | b = consistent under Ho and Ha; obtained from ivregress B = inconsistent under Ha, efficient under Ho; obtained from regress Test: Ho: difference in coefficients not systematic chi2(7) = (b-B)'[(V_b-V_B)^(-1)](b-B) = 0.25 Prob>chi2 =

24
23 Thus we do not reject the null hypothesis. As far as we can tell, there is no significant measurement error. DURBIN–WU – HAUSMAN SPECIFICATION TEST H 0 : Assumption B.7 is valid ---- Coefficients ---- | (b) (B) (b-B) sqrt(diag(V_b-V_B)) | EARNIV EARNOLS Difference S.E S | EXP | ASVABC | MALE | ETHBLACK | ETHHISP | _cons | b = consistent under Ho and Ha; obtained from ivregress B = inconsistent under Ha, efficient under Ho; obtained from regress Test: Ho: difference in coefficients not systematic chi2(7) = (b-B)'[(V_b-V_B)^(-1)](b-B) = 0.25 Prob>chi2 =

25
24 This is almost certainly the right conclusion in this case, because the schooling histories of the respondents in the NLSY have been recorded with great care. DURBIN–WU – HAUSMAN SPECIFICATION TEST H 0 : Assumption B.7 is valid ---- Coefficients ---- | (b) (B) (b-B) sqrt(diag(V_b-V_B)) | EARNIV EARNOLS Difference S.E S | EXP | ASVABC | MALE | ETHBLACK | ETHHISP | _cons | b = consistent under Ho and Ha; obtained from ivregress B = inconsistent under Ha, efficient under Ho; obtained from regress Test: Ho: difference in coefficients not systematic chi2(7) = (b-B)'[(V_b-V_B)^(-1)](b-B) = 0.25 Prob>chi2 =

26
25 However, if the test statistic is not significant, this does not necessarily mean that the null hypothesis is true. It could be that it is false, but the instruments used in IV are so weak that the differences between the IV and OLS estimates are not significant. DURBIN–WU – HAUSMAN SPECIFICATION TEST H 0 : Assumption B.7 is valid ---- Coefficients ---- | (b) (B) (b-B) sqrt(diag(V_b-V_B)) | EARNIV EARNOLS Difference S.E S | EXP | ASVABC | MALE | ETHBLACK | ETHHISP | _cons | b = consistent under Ho and Ha; obtained from ivregress B = inconsistent under Ha, efficient under Ho; obtained from regress Test: Ho: difference in coefficients not systematic chi2(7) = (b-B)'[(V_b-V_B)^(-1)](b-B) = 0.25 Prob>chi2 =

27
Copyright Christopher Dougherty 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 8.5 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 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 or the University of London International Programmes distance learning course 20 Elements of Econometrics

Similar presentations

© 2017 SlidePlayer.com Inc.

All rights reserved.

Ads by Google