Download presentation

Presentation is loading. Please wait.

Published byIsaias Seavy Modified over 2 years ago

1
Christopher Dougherty EC220 - Introduction to econometrics (chapter 3) Slideshow: graphing a relationship in a multiple regression model Original citation: Dougherty, C. (2012) EC220 - Introduction to econometrics (chapter 3). [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
GRAPHING A RELATIONSHIP IN A MULTIPLE REGRESSION MODEL. reg EARNINGS S EXP Source | SS df MS Number of obs = F( 2, 537) = Model | Prob > F = Residual | R-squared = Adj R-squared = Total | Root MSE = EARNINGS | Coef. Std. Err. t P>|t| [95% Conf. Interval] S | EXP | _cons | The output above shows the result of regressing EARNINGS, hourly earnings in dollars, on S, years of schooling, and EXP, years of work experience. 1

3
GRAPHING A RELATIONSHIP IN A MULTIPLE REGRESSION MODEL 2 Suppose that you were particularly interested in the relationship between EARNINGS and S and wished to represent it graphically, using the sample data.

4
GRAPHING A RELATIONSHIP IN A MULTIPLE REGRESSION MODEL 3 A simple plot would be misleading.

5
GRAPHING A RELATIONSHIP IN A MULTIPLE REGRESSION MODEL 4 Schooling is negatively correlated with work experience. The plot fails to take account of this, and as a consequence the regression line underestimates the impact of schooling on earnings.. cor S EXP (obs=540) | S ASVABC S| EXP|

6
GRAPHING A RELATIONSHIP IN A MULTIPLE REGRESSION MODEL 5. cor S EXP (obs=540) | S ASVABC S| EXP| We will investigate the distortion mathematically when we come to omitted variable bias.

7
GRAPHING A RELATIONSHIP IN A MULTIPLE REGRESSION MODEL 6. cor S EXP (obs=540) | S ASVABC S| EXP| To eliminate the distortion, you purge both EARNINGS and S of their components related to EXP and then draw a scatter diagram using the purged variables.

8
. reg EARNINGS EXP Source | SS df MS Number of obs = F( 1, 538) = 2.98 Model | Prob > F = Residual | R-squared = Adj R-squared = Total | Root MSE = EARNINGS | Coef. Std. Err. t P>|t| [95% Conf. Interval] EXP | _cons | predict EEARN, resid GRAPHING A RELATIONSHIP IN A MULTIPLE REGRESSION MODEL 7 We start by regressing EARNINGS on EXP, as shown above. The residuals are the part of EARNINGS which is not related to EXP. The ‘predict’ command is the Stata command for saving the residuals from the most recent regression. We name them EEARN.

9
. reg S EXP Source | SS df MS Number of obs = F( 1, 538) = Model | Prob > F = Residual | R-squared = Adj R-squared = Total | Root MSE = S | Coef. Std. Err. t P>|t| [95% Conf. Interval] EXP | _cons | predict ES, resid GRAPHING A RELATIONSHIP IN A MULTIPLE REGRESSION MODEL 8 We do the same with S. We regress it on EXP and save the residuals as ES.

10
GRAPHING A RELATIONSHIP IN A MULTIPLE REGRESSION MODEL 9 Now we plot EEARN on ES and the scatter is a faithful representation of the relationship, both in terms of the slope of the trend line (the black line) and in terms of the variation about that line.

11
GRAPHING A RELATIONSHIP IN A MULTIPLE REGRESSION MODEL 10 As you would expect, the trend line is steeper that in scatter diagram which did not control for EXP (reproduced here as the red line).

12
. reg EEARN ES Source | SS df MS Number of obs = F( 1, 538) = Model | Prob > F = Residual | R-squared = Adj R-squared = Total | Root MSE = EEARN | Coef. Std. Err. t P>|t| [95% Conf. Interval] ES | _cons | 8.10e From multiple regression:. reg EARNINGS S EXP EARNINGS | Coef. Std. Err. t P>|t| [95% Conf. Interval] S | EXP | _cons | GRAPHING A RELATIONSHIP IN A MULTIPLE REGRESSION MODEL 11 Here is the regression of EEARN on ES.

13
. reg EEARN ES Source | SS df MS Number of obs = F( 1, 538) = Model | Prob > F = Residual | R-squared = Adj R-squared = Total | Root MSE = EEARN | Coef. Std. Err. t P>|t| [95% Conf. Interval] ES | _cons | 8.10e From multiple regression:. reg EARNINGS S EXP EARNINGS | Coef. Std. Err. t P>|t| [95% Conf. Interval] S | EXP | _cons | GRAPHING A RELATIONSHIP IN A MULTIPLE REGRESSION MODEL 12 A mathematical proof that the technique works requires matrix algebra. We will content ourselves by verifying that the estimate of the slope coefficient is the same as in the multiple regression.

14
. reg EEARN ES Source | SS df MS Number of obs = F( 1, 538) = Model | Prob > F = Residual | R-squared = Adj R-squared = Total | Root MSE = EEARN | Coef. Std. Err. t P>|t| [95% Conf. Interval] ES | _cons | 8.10e From multiple regression:. reg EARNINGS S EXP EARNINGS | Coef. Std. Err. t P>|t| [95% Conf. Interval] S | EXP | _cons | GRAPHING A RELATIONSHIP IN A MULTIPLE REGRESSION MODEL 13 Finally, a small and not very important technical point. You may have noticed that the standard error and t statistic do not quite match. The reason for this is that the number of degrees of freedom is overstated by 1 in the residuals regression.

15
. reg EEARN ES Source | SS df MS Number of obs = F( 1, 538) = Model | Prob > F = Residual | R-squared = Adj R-squared = Total | Root MSE = EEARN | Coef. Std. Err. t P>|t| [95% Conf. Interval] ES | _cons | 8.10e From multiple regression:. reg EARNINGS S EXP EARNINGS | Coef. Std. Err. t P>|t| [95% Conf. Interval] S | EXP | _cons | GRAPHING A RELATIONSHIP IN A MULTIPLE REGRESSION MODEL 14 That regression has not made allowance for the fact that we have already used up 1 degree of freedom in removing EXP from the model.

16
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 3.2 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

© 2016 SlidePlayer.com Inc.

All rights reserved.

Ads by Google