Christopher Dougherty EC220 - Introduction to econometrics (chapter 4) Slideshow: interactive explanatory variables Original citation: Dougherty, C. (2012)

Slides:



Advertisements
Similar presentations
CHOW TEST AND DUMMY VARIABLE GROUP TEST
Advertisements

EC220 - Introduction to econometrics (chapter 5)
EC220 - Introduction to econometrics (chapter 10)
Christopher Dougherty EC220 - Introduction to econometrics (chapter 5) Slideshow: slope dummy variables Original citation: Dougherty, C. (2012) EC220 -
Christopher Dougherty EC220 - Introduction to econometrics (chapter 1) Slideshow: exercise 1.16 Original citation: Dougherty, C. (2012) EC220 - Introduction.
Christopher Dougherty EC220 - Introduction to econometrics (chapter 2) Slideshow: a Monte Carlo experiment Original citation: Dougherty, C. (2012) EC220.
Christopher Dougherty EC220 - Introduction to econometrics (chapter 10) Slideshow: introduction to maximum likelihood estimation Original citation: Dougherty,
Christopher Dougherty EC220 - Introduction to econometrics (chapter 11) Slideshow: adaptive expectations Original citation: Dougherty, C. (2012) EC220.
EC220 - Introduction to econometrics (chapter 7)
Christopher Dougherty EC220 - Introduction to econometrics (chapter 12) Slideshow: dynamic model specification Original citation: Dougherty, C. (2012)
Christopher Dougherty EC220 - Introduction to econometrics (chapter 2) Slideshow: testing a hypothesis relating to a regression coefficient Original citation:
HETEROSCEDASTICITY-CONSISTENT STANDARD ERRORS 1 Heteroscedasticity causes OLS standard errors to be biased is finite samples. However it can be demonstrated.
EC220 - Introduction to econometrics (chapter 7)
1 BINARY CHOICE MODELS: PROBIT ANALYSIS In the case of probit analysis, the sigmoid function F(Z) giving the probability is the cumulative standardized.
Christopher Dougherty EC220 - Introduction to econometrics (chapter 3) Slideshow: exercise 3.5 Original citation: Dougherty, C. (2012) EC220 - Introduction.
EC220 - Introduction to econometrics (chapter 2)
Christopher Dougherty EC220 - Introduction to econometrics (review chapter) Slideshow: expected value of a function of a random variable Original citation:
Christopher Dougherty EC220 - Introduction to econometrics (chapter 6) Slideshow: variable misspecification iii: consequences for diagnostics Original.
EC220 - Introduction to econometrics (chapter 1)
1 INTERPRETATION OF A REGRESSION EQUATION The scatter diagram shows hourly earnings in 2002 plotted against years of schooling, defined as highest grade.
TESTING A HYPOTHESIS RELATING TO A REGRESSION COEFFICIENT This sequence describes the testing of a hypotheses relating to regression coefficients. It is.
Christopher Dougherty EC220 - Introduction to econometrics (chapter 3) Slideshow: prediction Original citation: Dougherty, C. (2012) EC220 - Introduction.
SLOPE DUMMY VARIABLES 1 The scatter diagram shows the data for the 74 schools in Shanghai and the cost functions derived from a regression of COST on N.
Christopher Dougherty EC220 - Introduction to econometrics (chapter 3) Slideshow: precision of the multiple regression coefficients Original citation:
Christopher Dougherty EC220 - Introduction to econometrics (chapter 4) Slideshow: semilogarithmic models Original citation: Dougherty, C. (2012) EC220.
Christopher Dougherty EC220 - Introduction to econometrics (chapter 4) Slideshow: nonlinear regression Original citation: Dougherty, C. (2012) EC220 -
Christopher Dougherty EC220 - Introduction to econometrics (chapter 10) Slideshow: maximum likelihood estimation of regression coefficients Original citation:
Christopher Dougherty EC220 - Introduction to econometrics (chapter 5) Slideshow: Chow test Original citation: Dougherty, C. (2012) EC220 - Introduction.
TOBIT ANALYSIS Sometimes the dependent variable in a regression model is subject to a lower limit or an upper limit, or both. Suppose that in the absence.
Christopher Dougherty EC220 - Introduction to econometrics (chapter 5) Slideshow: dummy variable classification with two categories Original citation:
Christopher Dougherty EC220 - Introduction to econometrics (chapter 5) Slideshow: two sets of dummy variables Original citation: Dougherty, C. (2012) EC220.
Christopher Dougherty EC220 - Introduction to econometrics (chapter 5) Slideshow: the effects of changing the reference category Original citation: Dougherty,
Christopher Dougherty EC220 - Introduction to econometrics (chapter 5) Slideshow: dummy classification with more than two categories Original citation:
DUMMY CLASSIFICATION WITH MORE THAN TWO CATEGORIES This sequence explains how to extend the dummy variable technique to handle a qualitative explanatory.
Christopher Dougherty EC220 - Introduction to econometrics (chapter 12) Slideshow: autocorrelation, partial adjustment, and adaptive expectations Original.
Christopher Dougherty EC220 - Introduction to econometrics (chapter 10) Slideshow: Tobit models Original citation: Dougherty, C. (2012) EC220 - Introduction.
1 INTERACTIVE EXPLANATORY VARIABLES The model shown above is linear in parameters and it may be fitted using straightforward OLS, provided that the regression.
Christopher Dougherty EC220 - Introduction to econometrics (review chapter) Slideshow: conflicts between unbiasedness and minimum variance Original citation:
Christopher Dougherty EC220 - Introduction to econometrics (chapter 8) Slideshow: measurement error Original citation: Dougherty, C. (2012) EC220 - Introduction.
1 TWO SETS OF DUMMY VARIABLES The explanatory variables in a regression model may include multiple sets of dummy variables. This sequence provides an example.
Confidence intervals were treated at length in the Review chapter and their application to regression analysis presents no problems. We will not repeat.
1 PROXY VARIABLES Suppose that a variable Y is hypothesized to depend on a set of explanatory variables X 2,..., X k as shown above, and suppose that for.
F TEST OF GOODNESS OF FIT FOR THE WHOLE EQUATION 1 This sequence describes two F tests of goodness of fit in a multiple regression model. The first relates.
MULTIPLE REGRESSION WITH TWO EXPLANATORY VARIABLES: EXAMPLE 1 This sequence provides a geometrical interpretation of a multiple regression model with two.
Christopher Dougherty EC220 - Introduction to econometrics (chapter 12) Slideshow: footnote: the Cochrane-Orcutt iterative process Original citation: Dougherty,
Christopher Dougherty EC220 - Introduction to econometrics (chapter 1) Slideshow: exercise 1.5 Original citation: Dougherty, C. (2012) EC220 - Introduction.
Simple regression model: Y =  1 +  2 X + u 1 We have seen that the regression coefficients b 1 and b 2 are random variables. They provide point estimates.
Christopher Dougherty EC220 - Introduction to econometrics (chapter 9) Slideshow: instrumental variable estimation: variation Original citation: Dougherty,
. reg LGEARN S WEIGHT85 Source | SS df MS Number of obs = F( 2, 537) = Model |
Christopher Dougherty EC220 - Introduction to econometrics (chapter 6) Slideshow: multiple restrictions and zero restrictions Original citation: Dougherty,
Christopher Dougherty EC220 - Introduction to econometrics (chapter 5) Slideshow: exercise 5.2 Original citation: Dougherty, C. (2012) EC220 - Introduction.
(1)Combine the correlated variables. 1 In this sequence, we look at four possible indirect methods for alleviating a problem of multicollinearity. POSSIBLE.
COST 11 DUMMY VARIABLE CLASSIFICATION WITH TWO CATEGORIES 1 This sequence explains how you can include qualitative explanatory variables in your regression.
Christopher Dougherty EC220 - Introduction to econometrics (review chapter) Slideshow: alternative expression for population variance Original citation:
Christopher Dougherty EC220 - Introduction to econometrics (chapter 6) Slideshow: exercise 6.13 Original citation: Dougherty, C. (2012) EC220 - Introduction.
RAMSEY’S RESET TEST OF FUNCTIONAL MISSPECIFICATION 1 Ramsey’s RESET test of functional misspecification is intended to provide a simple indicator of evidence.
1 NONLINEAR REGRESSION Suppose you believe that a variable Y depends on a variable X according to the relationship shown and you wish to obtain estimates.
1 CHANGES IN THE UNITS OF MEASUREMENT Suppose that the units of measurement of Y or X are changed. How will this affect the regression results? Intuitively,
SEMILOGARITHMIC MODELS 1 This sequence introduces the semilogarithmic model and shows how it may be applied to an earnings function. The dependent variable.
GRAPHING A RELATIONSHIP IN A MULTIPLE REGRESSION MODEL The output above shows the result of regressing EARNINGS, hourly earnings in dollars, on S, years.
1 REPARAMETERIZATION OF A MODEL AND t TEST OF A LINEAR RESTRICTION Linear restrictions can also be tested using a t test. This involves the reparameterization.
F TESTS RELATING TO GROUPS OF EXPLANATORY VARIABLES 1 We now come to more general F tests of goodness of fit. This is a test of the joint explanatory power.
WHITE TEST FOR HETEROSCEDASTICITY 1 The White test for heteroscedasticity looks for evidence of an association between the variance of the disturbance.
Christopher Dougherty EC220 - Introduction to econometrics (review chapter) Slideshow: independence of two random variables Original citation: Dougherty,
1 COMPARING LINEAR AND LOGARITHMIC SPECIFICATIONS When alternative specifications of a regression model have the same dependent variable, R 2 can be used.
VARIABLE MISSPECIFICATION II: INCLUSION OF AN IRRELEVANT VARIABLE In this sequence we will investigate the consequences of including an irrelevant variable.
VARIABLE MISSPECIFICATION I: OMISSION OF A RELEVANT VARIABLE In this sequence and the next we will investigate the consequences of misspecifying the regression.
Introduction to Econometrics, 5th edition
Introduction to Econometrics, 5th edition
Introduction to Econometrics, 5th edition
Presentation transcript:

Christopher Dougherty EC220 - Introduction to econometrics (chapter 4) Slideshow: interactive explanatory variables Original citation: Dougherty, C. (2012) EC220 - Introduction to econometrics (chapter 4). [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

1 INTERACTIVE EXPLANATORY VARIABLES The model shown above is linear in parameters and it may be fitted using straightforward OLS, provided that the regression model assumptions are satisfied. However, the fact that it is nonlinear in variables has implications for the interpretation of the parameters.

2 INTERACTIVE EXPLANATORY VARIABLES When multiple regression was introduced at the beginning of the previous chapter, it was stated that the slope coefficients represented the separate, individual marginal effects of the variables on Y, holding the other variables constant.

3 INTERACTIVE EXPLANATORY VARIABLES In this model, such an interpretation is not possible. In particular, it is not possible to interpret  2 as the effect of X 2 on Y, holding X 3 and X 2 X 3 constant, because it is not possible to hold both X 3 and X 2 X 3 constant if X 2 changes.

4 INTERACTIVE EXPLANATORY VARIABLES To give a proper interpretation to the coefficients, we can rewrite the model as shown. The coefficient of X 2, (  2 +  4 X 3 ), can now be interpreted as the marginal effect of X 2 on Y, holding X 3 constant.

5 INTERACTIVE EXPLANATORY VARIABLES This representation makes explicit the fact that the marginal effect of X 2 depends on the value of X 3. The interpretation of  2 now becomes the marginal effect of X 2 on Y, when X 3 is equal to zero.

6 INTERACTIVE EXPLANATORY VARIABLES One may equally well rewrite the model as in the third line. From this it may be seen that the marginal effect of X 3 on Y, holding X 2 constant, is (  3 +  4 X 2 ) and that  3 may be interpreted as the marginal effect of X 3 on Y, when X 2 is equal to zero.

7 INTERACTIVE EXPLANATORY VARIABLES If X 3 = 0 is a long way outside its range in the sample, the interpretation of the estimate of  2 as an estimate of the marginal effect of X 2 when X 3 = 0 should be treated with caution.

8 INTERACTIVE EXPLANATORY VARIABLES Sometimes the estimate will be completely implausible, in the same way as the estimate of the intercept in a regression is often implausible if given a literal interpretation.

9 INTERACTIVE EXPLANATORY VARIABLES This can make it difficult to compare the estimates of the effects of X 2 and X 3 on Y in models excluding and including the interactive term.

10 INTERACTIVE EXPLANATORY VARIABLES One way of mitigating the problem is to rescale X 2 and X 3 so that they are measured from their sample means:

11 INTERACTIVE EXPLANATORY VARIABLES Substituting for X 2 and X 3, the model is as shown, with new parameters defined in terms of the original ones.

12 INTERACTIVE EXPLANATORY VARIABLES The point of doing this is that the coefficients of X 2 and X 3 now give the marginal effects of the variables when the other variable is held at its sample mean, which is to some extent a representative value.

13 INTERACTIVE EXPLANATORY VARIABLES For example, rewriting the new equation as the bottom line above, it can be seen that  2 * gives the marginal effect of X 2 *, and hence X 2, when X 3 * = 0, that is, when X 3 is at its sample mean.  2 * has a similar interpretation.

. reg LGEARN S EXP Source | SS df MS Number of obs = F( 2, 267) = Model | Prob > F = Residual | R-squared = Adj R-squared = Total | Root MSE = LGEARN | Coef. Std. Err. t P>|t| [95% Conf. Interval] S | EXP | _cons | INTERACTIVE EXPLANATORY VARIABLES We will illustrate the analysis with a wage equation where the logarithm of hourly earnings is regressed on years of schooling and work experience. We start with a straightforward linear specification, using EAEF Data Set 21..

. reg LGEARN S EXP Source | SS df MS Number of obs = F( 2, 267) = Model | Prob > F = Residual | R-squared = Adj R-squared = Total | Root MSE = LGEARN | Coef. Std. Err. t P>|t| [95% Conf. Interval] S | EXP | _cons | INTERACTIVE EXPLANATORY VARIABLES The regression implies that an extra year of schooling increases earnings by 13.0 percent and that an extra year of work experience increases them by 3.2 percent.

. gen SEXP = S*EXP. reg LGEARN S EXP SEXP Source | SS df MS Number of obs = F( 3, 266) = Model | Prob > F = Residual | R-squared = Adj R-squared = Total | Root MSE = LGEARN | Coef. Std. Err. t P>|t| [95% Conf. Interval] S | EXP | SEXP | _cons | INTERACTIVE EXPLANATORY VARIABLES The interactive variable SEXP is defined as the product of S and EXP and the regression is performed again, including this term.

17 INTERACTIVE EXPLANATORY VARIABLES The schooling coefficient now jumps to 23.7 percent, an extraordinarily high figure. But of course it has now changed its meaning. It now estimates the impact of an extra year of schooling for those individuals who have no work experience.. reg LGEARN S EXP LGEARN | Coef. Std. Err. t P>|t| [95% Conf. Interval] S | EXP | _cons | gen SEXP = S*EXP. reg LGEARN S EXP SEXP LGEARN | Coef. Std. Err. t P>|t| [95% Conf. Interval] S | EXP | SEXP | _cons |

18 INTERACTIVE EXPLANATORY VARIABLES. reg LGEARN S EXP LGEARN | Coef. Std. Err. t P>|t| [95% Conf. Interval] S | EXP | _cons | gen SEXP = S*EXP. reg LGEARN S EXP SEXP LGEARN | Coef. Std. Err. t P>|t| [95% Conf. Interval] S | EXP | SEXP | _cons | The experience coefficient has also risen sharply. Now it indicates that an extra year increases earnings by a wholly implausible 12.3 percent. But this figure refers to individuals with no schooling, and every individual in the sample had at least 8 years.

19 INTERACTIVE EXPLANATORY VARIABLES. sum S EXP Variable | Obs Mean Std. Dev. Min Max S | EXP | gen S1 = S gen EXP1 = EXP gen SEXP1 = S1*EXP1 We now define S1, EXP1, and SEXP1 as the corresponding schooling, experience, and interactive variables with the means subtracted, and repeat the regressions. We first use the sum (summarize) command to find the mean values of S and EXP.

. reg LGEARN S1 EXP1 Source | SS df MS Number of obs = F( 2, 267) = Model | Prob > F = Residual | R-squared = Adj R-squared = Total | Root MSE = LGEARN | Coef. Std. Err. t P>|t| [95% Conf. Interval] S1 | EXP1 | _cons | INTERACTIVE EXPLANATORY VARIABLES Here is the regression without the interactive term. The top half of the output is identical to that when LGEARN was regressed on S and EXP. What differences do you expect in the bottom half?

. reg LGEARN S1 EXP LGEARN | Coef. Std. Err. t P>|t| [95% Conf. Interval] S1 | EXP1 | _cons | reg LGEARN S EXP LGEARN | Coef. Std. Err. t P>|t| [95% Conf. Interval] S | EXP | _cons | INTERACTIVE EXPLANATORY VARIABLES The slope coefficients (and their standard errors and t statistics) are exactly the same as before. Only the intercept has been changed by subtracting the means from S and EXP.

. reg LGEARN S1 EXP1 SEXP1 Source | SS df MS Number of obs = F( 3, 266) = Model | Prob > F = Residual | R-squared = Adj R-squared = Total | Root MSE = LGEARN | Coef. Std. Err. t P>|t| [95% Conf. Interval] S1 | EXP1 | SEXP1 | _cons | INTERACTIVE EXPLANATORY VARIABLES Here is the output from the regression using S and EXP with means extracted, with their interactive term. The top half of the output is identical to that when LGEARN was regressed on S, EXP, and SEXP.

. reg LGEARN S1 EXP1 SEXP LGEARN | Coef. Std. Err. t P>|t| [95% Conf. Interval] S1 | EXP1 | SEXP1 | _cons | reg LGEARN S EXP SEXP LGEARN | Coef. Std. Err. t P>|t| [95% Conf. Interval] S | EXP | SEXP | _cons | INTERACTIVE EXPLANATORY VARIABLES However the bottom half is different. The coefficients of S1 and EXP1 measure the effects of those variables for the mean value of the other variable, that is, for a ‘typical’ individual. The coefficients of S and EXP measures their effects when the other variable is zero.

. reg LGEARN S1 EXP1 SEXP LGEARN | Coef. Std. Err. t P>|t| [95% Conf. Interval] S1 | EXP1 | SEXP1 | _cons | reg LGEARN S EXP SEXP LGEARN | Coef. Std. Err. t P>|t| [95% Conf. Interval] S | EXP | SEXP | _cons | INTERACTIVE EXPLANATORY VARIABLES Note that the coefficient of the interactive term is the same. It measures the change in the schooling coefficient per unit (one year) change in experience and is unaffected by the extraction of the means. (It also measures the change in the experience coefficient per unit change in schooling.)

. reg LGEARN S1 EXP1 SEXP LGEARN | Coef. Std. Err. t P>|t| [95% Conf. Interval] S1 | EXP1 | SEXP1 | _cons | reg LGEARN S1 EXP LGEARN | Coef. Std. Err. t P>|t| [95% Conf. Interval] S1 | EXP1 | _cons | INTERACTIVE EXPLANATORY VARIABLES With the means-extracted variables, we can see more clearly the impact of including the interactive term. If we assume that it should be in the model, omitting it causes the schooling coefficient to be upwards biased but does not have much effect on the experience coefficient.

.reg LGEARN S EXP SEXP LGEARN | Coef. Std. Err. t P>|t| [95% Conf. Interval] S | EXP | SEXP | _cons | reg LGEARN S EXP LGEARN | Coef. Std. Err. t P>|t| [95% Conf. Interval] S | EXP | _cons | INTERACTIVE EXPLANATORY VARIABLES For comparison, here again are the corresponding results with the original variables, where the introduction of the interactive term appears to have a dramatic effect.

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 4.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 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