





Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!






Second Order Regression Models We have seen that by adding additional independent (explanatory) variables into a regression model we can reduce the standard deviation of the response (dependent) variable and thus increase its predictive power. Intuitively, this is by virtue of the fact that the new variables explain some of the hitherto unexplained deviations of the observed versus the estimated Y values. One can also use the power of multiple regression to improve the fit without new independent variables by allowing a somewhat more complex relationship ( i. e. , non- linear) between the existing independent variables and the response variable. In this note, instead of identifying new explanatory variables, we are going to introduce some extensions to the simple linear model that allow “curvature” in the response surface. These extensions use the existing independent variables to derive new variables (such as X^2 or X 1 X 2 ) and thus increase the number of independent variables. Therefore here is a caution before we proceed. It is a mathematical fact that the more independent variables used in a regression model, the smaller the deviations between the actual and the predicted response variables. In fact, if you have n observations, n- 1 independent variables (even if they may have no bearing on the dependent variable) will result in a perfect fit with no deviations. The reason this occurs is related to the degrees of freedom of the regression. The more variables are used the more degrees of freedom are lost. If n- 1 independent variables are used, the result is 0 degrees of freedom, making the model completely useless for predicting the dependent variable. Therefore we need to be judicious when deciding whether to include a factor as an independent variable, because there is a “cost.” Recall that the “adjusted R^2 ” tries to account for this cost. The principle of parsimony requires that only those variables that theoretically explain variability in the response variable should be used, but those that have marginal or no explanatory power should not. I. Second order Models Look at the plot of the sample observations of income versus consumption below. It is fairly obvious that the relationship between consumption (dependent variable) and income (independent variable) is not best described by a straight line. As economic theory predicts, it appears that as income increases the rate of increase in consumption
tapers off; as your income increases you tend to consume more but the increase in your consumption begins to slow. The linear model Y = A + BX + ε would yield a poor fit, because it essentially would be forcing a round peg in a square hole. Obviously a better fitting model would allow a curvature in the response surface. In this case the addition of a square term as Y = A + B 1 X + B 2 X^2 + ε , may capture the apparent non-linearity. We can estimate this model by adding the X^2 values as a second “independent” variable and run it as a multiple regression. The parameter B 2 is called the rate of curvature and its significance can be tested in the usual way. That is test the null hypothesis Ho: B 2 = 0 versus B 2 < 0 (or B 2 > 0), using the t -statistic. If B 2 is significant and < 0 then as shown in the above example the curvature is concave--the impact of the independent variable on the dependent variable decreases as X increases. If, on the other hand, B 2 is significant and > 0, we have a convex relationship, where the rate of change of the dependent variable strengthens as X increases. The same conclusion can be reached mathematically by examining the derivative of Y with respect to X , which is B 1 + 2 B 2 X. A negative B 2 will reduce the derivative as X increases and vice versa. Notice further that in a model in which B 1 is zero implies a U shape relationship if B 2 > 0 (inverted U if B 2 < 0). Finally even higher order models can be constructed by including a cubic term, fourth power term etc. Example: assume X is the household weekly income and Y the weekly consumption 0 100 200 300 400 500 0 500 1000 1500 Y=Consumption X = Income The first order model Y = A + BX + ε is estimated as Regression Statistics Multiple R 0. R Square 0. Adjusted R Square 0. Standard Error 30. Observations 12 ANOVA df SS MS F Significance F Regression 1 26381.61 26381.61 27.60872 0. Residual 10 9555.536 955. Total 11 35937. Y X 252.71 300 271.81 350 333.73 450 238.08 235 361.16 1020 383.60 880 359.20 567 209.23 230 324.49 470 344.93 905 297.71 468 367.60 750
Compared to the first-order model this is a much better model of the consumption as a function of income. Coefficient of determination is now about 93.7%, both B 1 and B 2 highly significant. Negative B 2 indicates that the relationship between income and consumption moderates as income increases. Caution: for sufficiently high income levels an increase in income may reduce consumption i.e ., the slope may become negative. Remember, however that predictions of the dependent variable for values of the independent variable outside of the range in the sample (here from 230 to 1020) will give misleading results. II. Interaction Models Consider the linear model with two independent variables Y = A + B 1 X 1 + B 2 X 2 + ε. Say Y is compensation ($000), X 1 education and X 2 experience of bank tellers both in years. Suppose the estimated model is Y = 20 + .5X 1 + 2.3X 2 + ε. We can question the relationship between pay ( Y ) and education ( X 1 ) for any fixed value of experience ( X 2 ). For instance, for X 2 = 1 the equation becomes Y = 22.3 + .5X 1 + ε, while for X 2 = 2, it is Y = 24.6 + .5X 1 + ε. Therefore in this model regardless of the experience ( X 2 ), pay tends to increase by $500 for every additional year of education ( X 1 ). This relationship between Y and X 1 for various levels of X 2 can be graphed as follows. The slope of the line does not change as X 2 changes, only the intercept changes. In this type of a relationship X 1 and X 2 are said not to interact. It is plausible however to suspect that the impact of education on pay for those with little experience might be stronger than those with a lot of experience. Namely we might think that the impact of education on pay might moderate as experience increases and we may want our model to reflect this possibility as graphed below:
For a person with little experience ( X 2 = 1) the rate of increase in pay as education increases is stronger (the line is steeper) than for a more experienced person ( X 2 = 3). In a model that allows this type of relationship, X 1 and X 2 are said to interact. We can model the interaction by including a term X 1 X 2 in the model. With this term included the model becomes Y = A + B 1 X 1 + B 2 X 2 + B 3 X 1 X2 + ε. This model can be estimated and the significance of the interaction term X 1 X 2 can be questioned by testing Ho: B 3 = 0 versus B 3 < 0 (or B 3 > 0) using student’s t. If B 3 < 0 and significant, then the interaction is negative. This means that as one variable increases in magnitude, the effect of the other variable on the independent variable moderates. This is the case in the above example. If B 3 > 0 and significant, the interaction is positive and the two variables reinforce one another. The same conclusion is reached by looking at the derivatives of Y with respect to X 1 and X 2. dY/dX 1 = B 1 + B 3 X 2 and dY/dX 2 = B 2 + B 3 X 1. If B 3 > 0 and significant, either derivative will be larger as the other variable increases and vice versa. Example; Y is pay ($000), X 1 education (yrs) and X 2 experience (yrs) Y X 1 X 2 X 1 X 2 53 1 3 3 64.2 2 2 4 42.8 1 2 2 66.4 4 1 4 81.5 5 4 20 63.8 2 3 6 66.2 1 5 5 57.2 3 2 6 77.8 6 3 18 97.5 8 6 48 84.3 4 8 32 68.1 3 2 6 The first order model is Y = A + B 1 X 1 + B 2 X 2 + ε and estimated as Regression Statistics Multiple R 0. R Square 0. Adjusted R Square 0. Standard Error 5. Observations 12 ANOVA df SS MS F Significanc e F Regression 2 2163.166 1081.583 37.18469 4.46E- Residual 9 261.781 29. Total 11 2424. Coefficient s Standard Error t Stat P-value Lower 95% Upper 95% Intercept 42.04253 3.542825 11.86695 8.47E-07 34.0281 50. X1 4.859923 0.795379 6.110198 0.000177 3.060651 6.
Suppose we have two independent variables to use for predicting the value of a dependent variable. A complete second order model can be formed by including both the squared variables as well as the interaction term as follows: Y = A + B 1 X 1 + B 2 X 2 + B 3 X 1 X 2 + B 4 X 1^2 + B 5 X 2^2 + ε. One way to test the appropriateness of this complex model compared to the simpler alternative first-order model Y = A + B 1 X 1 + B 2 X 2 + ε is to use the ordinary t- test the significance of B 3 , B 4 or B 5 one at a time. However, this will not always give a reliable diagnosis. To see why not, suppose for a moment that none of B 3 , B 4 and B 5 is significant. If we test each of these null hypotheses individually (that Bi = 0) at α = .05, there will be 95% chance we’ll make the correct decision for B 3 (that it is zero); 95% chance with respect to B 4 and 95% chance with respect to B 5. Thus the probability of correctly finding all the B s insignificant ( i.e ., zero) will be .95^3 = .857 leading to a type I error (probability of rejecting the null when it is true) of about 14.3%. Obviously the more additional terms we test the more this error will be. To avoid this we need to test the contribution of these second order terms collectively as Ho: B 3 = B 4 = B 5 = 0 H 1 : at least one is not zero Notice how similar this is to the F-test used for the general significance of the entire multiple regression model. As you may guess, the appropriate test statistic for this test is the F distribution and the test is called the partial F-test for we are testing a subset of the parameters, and not all of them. Let us refer to the simpler model Y = A + B 1 X 1 + B 2 X 2 + ε as the reduced model (as opposed to the complete model). For a general case let g to denote the number of B parameters in the reduced model (in our case g = 2) and k to denote the number of B parameters in the complete model (5 here). Let SSER and SSEC be the sum of squared errors for the reduced and the complete models respectively. Then the test statistic for the partial F test is given by: SSE /[ ( 1 )] (SSE -SSE )/( ) F C R C n- k k - g with k - g degrees of freedom for the numerator and n- ( k + 1) degrees of freedom for the denominator, where n is the sample size as before. If the computed test statistic exceeds the critical F (for the appropriate α with k - g and n – ( k + 1) degrees of freedom) the null is rejected and the significant contribution of the square terms and the interaction term to the predictive power of the model is acknowledged. To conduct this test in order to choose between the simpler (parsimonious) and the more complex model we need to estimate both models first and then do the partial F-test to choose between them. Example In the previous example of Y = pay; X 1 = education and X 2 = experience we can construct the complete model as Y = A + B 1 X 1 + B 2 X 2 + B 3 X 1 X 2 + B 4 X 1^2 + B 5 X 2^2 + ε and define the model Y = A + B 1 X 1 + B 2 X 2 + ε as the reduced model. The data to estimate both models is: Y X 1 X 2 X 1 X 2 X 12 X 22 53 1 3 3 1 9 64.2 2 2 4 4 4 42.8 1 2 2 1 4 66.4 4 1 4 16 1 81.5 5 4 20 25 16
63.8 2 3 6 4 9 66.2 1 5 5 1 25 57.2 3 2 6 9 4 77.8 6 3 18 36 9 97.5 8 6 48 64 36 84.3 4 8 32 16 64 68.1 3 2 6 9 4 We had already estimate the first order model Y = A + B 1 X 1 + B 2 X 2 + ε above. The estimate of Y = A + B 1 X 1 + B 2 X 2 + B 3 X 1 X 2 + B 4 X 12 + B 5 X 22 + ε Regression Statistics Multiple R 0. R Square 0. Adjusted R Square 0. Standard Error 5. Observations 12 ANOVA df SS MS F Significanc e F Regression 5 2210.927 442.1853 12.39656 0. Residual 6 214.02 35. Total 11 2424. Coefficient s Standard Error t Stat P-value Lower 95% Upper 95% Intercept 29.03369 12.49285 2.324025 0.059122 -1.53521 59. X1 8.691706 3.630475 2.394096 0.053725 -0.19175 17. X2 7.108731 4.789042 1.484374 0.188244 -4.60963 18. X1X2 -0.18994 0.823781 -0.23057 0.825313 -2.20565 1. X12 -0.37711 0.62401 -0.60433 0.567755 -1.90401 1. X22 -0.35318 0.581485 -0.60737 0.565865 -1.77602 1. The coefficient of determination is marginally better for the complete model, 91.1% versus 89.2% ( i.e ., the complete model accounts for 91.1% of the variation in the pay, the parsimonious model accounts for 89.2%). However, the complete model is not a better model-- none of the Bs appears to be significant. This happens as a result of two factors. First, since the sample size is relatively small the complete model has very few degrees of freedom (six as opposed to nine for the reduced model); and second, since the derived variables X 1 X 2 , X 1^2 and X 2^2 are mathematically related to the original variables X 1 and X 2 second order models tend to be susceptible to multi-co linearity. Although with these observations we can easily see that the parsimonious model is superior, let’s do the formal partial F-test to verify that the second order terms are not contributing significantly to the power of the model in predicting pay based on education and experience. SSEC = 214.02; SSER = 261.78; k =5; g = 2; n = 12