1 INTERACTIVE EXPLANATORY VARIABLES The model shown above is linear in parameters and it may be fitted using straightforward OLS, provided that the regression.

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 4) Slideshow: interactive explanatory variables Original citation: Dougherty, C. (2012)
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.
Random effects estimation RANDOM EFFECTS REGRESSIONS When the observed variables of interest are constant for each individual, a fixed effects regression.
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 (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.
1 A MONTE CARLO EXPERIMENT In the previous slideshow, we saw that the error term is responsible for the variations of b 2 around its fixed component 
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.
BINARY CHOICE MODELS: LOGIT ANALYSIS
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 -
DERIVING LINEAR REGRESSION COEFFICIENTS
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.
1 PREDICTION In the previous sequence, we saw how to predict the price of a good or asset given the composition of its characteristics. In this sequence,
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 10) Slideshow: Tobit models Original citation: Dougherty, C. (2012) EC220 - Introduction.
THE DUMMY VARIABLE TRAP 1 Suppose that you have a regression model with Y depending on a set of ordinary variables X 2,..., X k and a qualitative variable.
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.
MULTIPLE RESTRICTIONS AND ZERO RESTRICTIONS
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,
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.
A.1The model is linear in parameters and correctly specified. PROPERTIES OF THE MULTIPLE REGRESSION COEFFICIENTS 1 Moving from the simple to the multiple.
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.
POSSIBLE DIRECT MEASURES FOR ALLEVIATING MULTICOLLINEARITY 1 What can you do about multicollinearity if you encounter it? We will discuss some possible.
(1)Combine the correlated variables. 1 In this sequence, we look at four possible indirect methods for alleviating a problem of multicollinearity. POSSIBLE.
1 We will continue with a variation on the basic model. We will now hypothesize that p is a function of m, the rate of growth of the money supply, as well.
COST 11 DUMMY VARIABLE CLASSIFICATION WITH TWO CATEGORIES 1 This sequence explains how you can include qualitative explanatory variables in your regression.
Definition of, the expected value of a function of X : 1 EXPECTED VALUE OF A FUNCTION OF A RANDOM VARIABLE To find the expected value of a function of.
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 ESTIMATORS OF VARIANCE, COVARIANCE, AND CORRELATION We have seen that the variance of a random variable X is given by the expression above. Variance.
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.
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.
FOOTNOTE: THE COCHRANE–ORCUTT ITERATIVE PROCESS 1 We saw in the previous sequence that AR(1) autocorrelation could be eliminated by a simple manipulation.
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
Introduction to Econometrics, 5th edition
Introduction to Econometrics, 5th edition
Presentation transcript:

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 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. INTERACTIVE EXPLANATORY VARIABLES

3 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. INTERACTIVE EXPLANATORY VARIABLES

4 To make a proper interpretation of 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, conditional on the value of X 3. INTERACTIVE EXPLANATORY VARIABLES

5 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. INTERACTIVE EXPLANATORY VARIABLES

6 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, conditional on the value of X 2, 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. INTERACTIVE EXPLANATORY VARIABLES

7  4 may be interpreted as the change in the coefficient of X 2 when X 3 changes by one unit. Equally, it may be interpreted as the change in the coefficient of X 3 when X 2 changes by one unit. INTERACTIVE EXPLANATORY VARIABLES

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

9 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. INTERACTIVE EXPLANATORY VARIABLES

10 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. INTERACTIVE EXPLANATORY VARIABLES

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

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

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

14 For example, 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. INTERACTIVE EXPLANATORY VARIABLES

15  3 * has a similar interpretation. INTERACTIVE EXPLANATORY VARIABLES

. 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 | 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. INTERACTIVE EXPLANATORY VARIABLES

17 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. INTERACTIVE EXPLANATORY VARIABLES. 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 |

. 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 | The interactive variable SEXP is defined as the product of S and EXP and the regression is performed again, including this term. INTERACTIVE EXPLANATORY VARIABLES

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

. 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. 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 coefficient of SEXP indicates that the schooling coefficient falls by , that is, 0.65 percent, for every additional year of work experience. Equally, it indicates that the experience coefficient falls by 0.65 percent for every additional year of schooling. INTERACTIVE EXPLANATORY VARIABLES

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

. 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 | 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? INTERACTIVE EXPLANATORY VARIABLES

. reg LGEARN S EXP LGEARN | Coef. Std. Err. t P>|t| [95% Conf. Interval] S | EXP | _cons | 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. INTERACTIVE EXPLANATORY VARIABLES. reg LGEARN S1 EXP LGEARN | Coef. Std. Err. t P>|t| [95% Conf. Interval] S1 | EXP1 | _cons |

25 In the original specification, the constant estimates predicted LGEARN when S = 0 and EXP = 0. It implies hourly earnings of e 0.60 = $1.82. It is doubtful whether this is meaningful. INTERACTIVE EXPLANATORY VARIABLES. reg LGEARN S EXP LGEARN | Coef. Std. Err. t P>|t| [95% Conf. Interval] S | EXP | _cons | reg LGEARN S1 EXP LGEARN | Coef. Std. Err. t P>|t| [95% Conf. Interval] S1 | EXP1 | _cons |

26 In the revised specification, the constant estimates predicted LGEARN when S1 = 0 and EXP1 = 0, that is, when S and EXP are at their sample means. It implies hourly earnings of e 2.96 = $ This makes much better sense. INTERACTIVE EXPLANATORY VARIABLES. reg LGEARN S EXP LGEARN | Coef. Std. Err. t P>|t| [95% Conf. Interval] S | EXP | _cons | reg LGEARN S1 EXP LGEARN | Coef. Std. Err. t P>|t| [95% Conf. Interval] S1 | EXP1 | _cons |

. 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 | 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. INTERACTIVE EXPLANATORY VARIABLES

28 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 measure their effects when the other variable is zero. INTERACTIVE EXPLANATORY VARIABLES. 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 |

. 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 | Note that the coefficient of the interactive term is the same. INTERACTIVE EXPLANATORY VARIABLES

30 As before, 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. INTERACTIVE EXPLANATORY VARIABLES. 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 |

31 With the means-extracted variables, we can see more clearly the impact of including the interactive term. INTERACTIVE EXPLANATORY VARIABLES. reg LGEARN S1 EXP LGEARN | Coef. Std. Err. t P>|t| [95% Conf. Interval] S1 | EXP1 | _cons | reg LGEARN S1 EXP1 SEXP LGEARN | Coef. Std. Err. t P>|t| [95% Conf. Interval] S1 | EXP1 | SEXP1 | _cons |

32 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. INTERACTIVE EXPLANATORY VARIABLES. reg LGEARN S1 EXP LGEARN | Coef. Std. Err. t P>|t| [95% Conf. Interval] S1 | EXP1 | _cons | reg LGEARN S1 EXP1 SEXP LGEARN | Coef. Std. Err. t P>|t| [95% Conf. Interval] S1 | EXP1 | SEXP1 | _cons |

33 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. INTERACTIVE EXPLANATORY VARIABLES. reg LGEARN S EXP LGEARN | Coef. Std. Err. t P>|t| [95% Conf. Interval] S | EXP | _cons | reg LGEARN S EXP SEXP LGEARN | Coef. Std. Err. t P>|t| [95% Conf. Interval] S | EXP | SEXP | _cons |

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 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 EC2020 Elements of Econometrics