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