Download presentation
Presentation is loading. Please wait.
Published byAmberlynn Price Modified over 9 years ago
1
1 1 Slide © 2008 Thomson South-Western. All Rights Reserved Slides by JOHN LOUCKS St. Edward’s University
2
2 2 Slide © 2008 Thomson South-Western. All Rights Reserved Chapter 16 Regression Analysis: Model Building n Multiple Regression Approach to Experimental Design n General Linear Model n Determining When to Add or Delete Variables n Variable-Selection Procedures n Autocorrelation and the Durbin-Watson Test
3
3 3 Slide © 2008 Thomson South-Western. All Rights Reserved Models in which the parameters ( 0, 1,..., p ) all Models in which the parameters ( 0, 1,..., p ) all have exponents of one are called linear models. General Linear Model n A general linear model involving p independent variables is n Each of the independent variables z is a function of x 1, x 2,..., x k (the variables for which data have been collected).
4
4 4 Slide © 2008 Thomson South-Western. All Rights Reserved General Linear Model n The simplest case is when we have collected data for just one variable x 1 and want to estimate y by using a straight-line relationship. In this case z 1 = x 1. n This model is called a simple first-order model with one predictor variable.
5
5 5 Slide © 2008 Thomson South-Western. All Rights Reserved Modeling Curvilinear Relationships n This model is called a second-order model with one predictor variable. n To account for a curvilinear relationship, we might set z 1 = x 1 and z 2 =.
6
6 6 Slide © 2008 Thomson South-Western. All Rights Reserved Interaction n This type of effect is called interaction. n In this model, the variable z 5 = x 1 x 2 is added to account for the potential effects of the two variables acting together. n If the original data set consists of observations for y and two independent variables x 1 and x 2 we might develop a second-order model with two predictor variables.
7
7 7 Slide © 2008 Thomson South-Western. All Rights Reserved Transformations Involving the Dependent Variable n Another approach, called a reciprocal transformation, is to use 1/ y as the dependent variable instead of y. n Often the problem of nonconstant variance can be corrected by transforming the dependent variable to a different scale. n Most statistical packages provide the ability to apply logarithmic transformations using either the base-10 (common log) or the base e = 2.71828... (natural log).
8
8 8 Slide © 2008 Thomson South-Western. All Rights Reserved n We can transform this nonlinear model to a linear model by taking the logarithm of both sides. Nonlinear Models That Are Intrinsically Linear Models in which the parameters ( 0, 1,..., p ) have exponents other than one are called nonlinear models. Models in which the parameters ( 0, 1,..., p ) have exponents other than one are called nonlinear models. n In some cases we can perform a transformation of variables that will enable us to use regression analysis with the general linear model. n The exponential model involves the regression equation:
9
9 9 Slide © 2008 Thomson South-Western. All Rights Reserved Determining When to Add or Delete Variables n To test whether the addition of x 2 to a model involving x 1 (or the deletion of x 2 from a model involving x 1 and x 2 ) is statistically significant we can perform an F Test. n The F Test is based on a determination of the amount of reduction in the error sum of squares resulting from adding one or more independent variables to the model.
10
10 Slide © 2008 Thomson South-Western. All Rights Reserved Determining When to Add or Delete Variables n The p –value criterion can also be used to determine whether it is advantageous to add one or more dependent variables to a multiple regression model. The p –value associated with the computed F statistic can be compared to the level of significance . The p –value associated with the computed F statistic can be compared to the level of significance . It is difficult to determine the p –value directly from the tables of the F distribution, but computer software packages, such as Minitab or Excel, provide the p value. It is difficult to determine the p –value directly from the tables of the F distribution, but computer software packages, such as Minitab or Excel, provide the p value.
11
11 Slide © 2008 Thomson South-Western. All Rights Reserved Variable Selection Procedures n Stepwise Regression n Forward Selection n Backward Elimination Iterative; one independent variable at a time is added or deleted based on the F statistic Different subsets of the independent variables are evaluated n Best-Subsets Regression The first 3 procedures are heuristics. There is no guarantee that the best model will be found. The first 3 procedures are heuristics. There is no guarantee that the best model will be found.
12
12 Slide © 2008 Thomson South-Western. All Rights Reserved Variable Selection: Stepwise Regression n If no variable can be removed and no variable can be added, the procedure stops. n At each iteration, the first consideration is to see whether the least significant variable currently in the model can be removed because its F value is less than the user-specified or default Alpha to remove. n If no variable can be removed, the procedure checks to see whether the most significant variable not in the model can be added because its F value is greater than the user-specified or default Alpha to enter.
13
13 Slide © 2008 Thomson South-Western. All Rights Reserved Variable Selection: Forward Selection n This procedure is similar to stepwise regression, but does not permit a variable to be deleted. n This forward-selection procedure starts with no independent variables. n It adds variables one at a time as long as a significant reduction in the error sum of squares (SSE) can be achieved.
14
14 Slide © 2008 Thomson South-Western. All Rights Reserved Variable Selection: Backward Elimination n This procedure begins with a model that includes all the independent variables the modeler wants considered. n It then attempts to delete one variable at a time by determining whether the least significant variable currently in the model can be removed because its p - value is less than the user-specified or default value. n Once a variable has been removed from the model it cannot reenter at a subsequent step.
15
15 Slide © 2008 Thomson South-Western. All Rights Reserved Tony Zamora, a real estate investor, has just moved to Clarksville and wants to learn about the city’s residential real estate market. Tony has ran- domly selected 25 house-for-sale listings from the Sunday news- paper and collected the data partially listed on an upcoming slide. Variable Selection: Backward Elimination n Example: Clarksville Homes
16
16 Slide © 2008 Thomson South-Western. All Rights Reserved Variable Selection: Backward Elimination n Example: Clarksville Homes Develop, using the backward elimination Develop, using the backward elimination procedure, a multiple regression model to predict the selling price of a house in Clarksville.
17
17 Slide © 2008 Thomson South-Western. All Rights Reserved Variable Selection: Backward Elimination n n Partial Data Note: Rows 10-26 are not shown.
18
18 Slide © 2008 Thomson South-Western. All Rights Reserved Variable Selection: Backward Elimination n n Regression Output Greatest p -value >.05 Variable to be removed
19
19 Slide © 2008 Thomson South-Western. All Rights Reserved Variable Selection: Backward Elimination n Cars (garage size) is the independent variable with the highest p -value (.697) >.05. n Cars variable is removed from the model. n Multiple regression is performed again on the remaining independent variables.
20
20 Slide © 2008 Thomson South-Western. All Rights Reserved Variable Selection: Backward Elimination n n Regression Output Greatest p -value >.05 Variable to be removed
21
21 Slide © 2008 Thomson South-Western. All Rights Reserved Variable Selection: Backward Elimination n Bedrooms is the independent variable with the highest p -value (.281) >.05. n Bedrooms variable is removed from the model. n Multiple regression is performed again on the remaining independent variables.
22
22 Slide © 2008 Thomson South-Western. All Rights Reserved Variable Selection: Backward Elimination n n Regression Output Greatest p -value >.05 Variable to be removed
23
23 Slide © 2008 Thomson South-Western. All Rights Reserved Variable Selection: Backward Elimination n Bathrooms is the independent variable with the highest p -value (.110) >.05. n Bathrooms variable is removed from the model. n Multiple regression is performed again on the remaining independent variable.
24
24 Slide © 2008 Thomson South-Western. All Rights Reserved Variable Selection: Backward Elimination n n Regression Output Greatest p -value is <.05
25
25 Slide © 2008 Thomson South-Western. All Rights Reserved Variable Selection: Backward Elimination n House size is the only independent variable remaining in the model. n The estimated regression equation is:
26
26 Slide © 2008 Thomson South-Western. All Rights Reserved n Minitab output identifies the two best one-variable estimated regression equations, the two best two- variable equation, and so on. Variable Selection: Best-Subsets Regression n The three preceding procedures are one-variable-at- a-time methods offering no guarantee that the best model for a given number of variables will be found. n Some software packages include best-subsets regression that enables the user to find, given a specified number of independent variables, the best regression model.
27
27 Slide © 2008 Thomson South-Western. All Rights Reserved The Professional Golfers Association keeps a The Professional Golfers Association keeps a variety of statistics regarding performance measures. Data include the average driving distance, percentage of drives that land in the fairway, percent- age of greens hit in regulation, average number of putts, percentage of sand saves, and average score. n Example: PGA Tour Data Variable Selection: Best-Subsets Regression
28
28 Slide © 2008 Thomson South-Western. All Rights Reserved n Variable Names and Definitions Variable-Selection Procedures Score : average score for an 18-hole round Sand : percentage of sand saves (landing in a sand trap and still scoring par or better) Putt : average number of putts for greens that have been hit in regulation been hit in regulation Green : percentage of greens hit in regulation (a par-3 green is “hit in regulation” if the player’s first shot lands on the green) shot lands on the green) Fair : percentage of drives that land in the fairway Drive : average length of a drive in yards
29
29 Slide © 2008 Thomson South-Western. All Rights Reserved 272.9.615.6671.780.47670.19 272.9.615.6671.780.47670.19 Variable-Selection Procedures Drive Fair Green Putt Sand Score Drive Fair Green Putt Sand Score 277.6.681.6671.768.55069.10 277.6.681.6671.768.55069.10 259.6.691.6651.810.53671.09 259.6.691.6651.810.53671.09 269.1.657.6491.747.47270.12 269.1.657.6491.747.47270.12 267.0.689.6731.763.67269.88 267.0.689.6731.763.67269.88 267.3.581.6371.781.52170.71 267.3.581.6371.781.52170.71 255.6.778.6741.791.45569.76 255.6.778.6741.791.45569.76 n Sample Data 265.4.718.699 1.790.551 69.73 265.4.718.699 1.790.551 69.73
30
30 Slide © 2008 Thomson South-Western. All Rights Reserved n Sample Correlation Coefficients Variable-Selection Procedures Sand Putt Green Fair Drive Score Drive Fair Green Putt -.154 -.427 -.679 -.427 -.679 -.556 -.045.421.258 -.139.101.354 -.278 -.024.265.083 -.296
31
31 Slide © 2008 Thomson South-Western. All Rights Reserved Multiple Regression Approach to Experimental Design n We will use the results of multiple regression to perform the ANOVA test on the difference in the means of three populations. n The use of dummy variables in a multiple regression equation can provide another approach to solving analysis of variance and experimental design problems.
32
32 Slide © 2008 Thomson South-Western. All Rights Reserved Multiple Regression Approach to Experimental Design n Example: Reed Manufacturing Janet Reed would like to know if Janet Reed would like to know if there is any significant difference in the mean number of hours worked per week for the department managers at her three manufacturing plants (in Buffalo, Pittsburgh, and Detroit).
33
33 Slide © 2008 Thomson South-Western. All Rights Reserved n Example: Reed Manufacturing A simple random sample of five A simple random sample of five managers from each of the three plants was taken and the number of hours worked by each manager for the previous week is shown on the next slide. Multiple Regression Approach to Experimental Design
34
34 Slide © 2008 Thomson South-Western. All Rights Reserved 123454854575462 7363666474 5163615456 Plant 1 Buffalo Plant 2 Pittsburgh Plant 3 Detroit Observation Sample Mean Sample Variance 55 68 57 26.0 26.5 24.5 Multiple Regression Approach to Experimental Design
35
35 Slide © 2008 Thomson South-Western. All Rights Reserved Multiple Regression Approach to Experimental Design n We begin by defining two dummy variables, A and B, that will indicate the plant from which each sample observation was selected. A = 0, B = 1 if observation is from Detroit plant A = 1, B = 0 if observation is from Pittsburgh plant A = 0, B = 0 if observation is from Buffalo plant n In general, if there are k populations, we need to define k – 1 dummy variables.
36
36 Slide © 2008 Thomson South-Western. All Rights Reserved Multiple Regression Approach to Experimental Design 4854575462 7363666474 5163615456 Plant 1 Buffalo Plant 2 Pittsburgh Plant 3 Detroit 000000000011111000000000011111 A B y n Input Data
37
37 Slide © 2008 Thomson South-Western. All Rights Reserved E ( y ) = expected number of hours worked E ( y ) = expected number of hours worked = 0 + 1 A + 2 B = 0 + 1 A + 2 B Multiple Regression Approach to Experimental Design For Detroit: E ( y ) = 0 + 1 (0) + 2 (1) = 0 + 2 For Pittsburgh: E ( y ) = 0 + 1 (1) + 2 (0) = 0 + 1 For Buffalo: E ( y ) = 0 + 1 (0) + 2 (0) = 0
38
38 Slide © 2008 Thomson South-Western. All Rights Reserved Multiple Regression Approach to Experimental Design Excel produced the regression equation: Plant Estimate of E ( y ) BuffaloPittsburghDetroit b 0 = 55 b 0 + b 1 = 55 + 13 = 68 b 0 + b 2 = 55 + 2 = 57 y = 55 +13A + 2B
39
39 Slide © 2008 Thomson South-Western. All Rights Reserved Multiple Regression Approach to Experimental Design n Next, we observe that if there is no difference in the means: E ( y ) for the Pittsburgh plant – E ( y ) for the Buffalo plant = 0 E ( y ) for the Detroit plant – E ( y ) for the Buffalo plant = 0
40
40 Slide © 2008 Thomson South-Western. All Rights Reserved Multiple Regression Approach to Experimental Design Because 0 equals E ( y ) for the Buffalo plant and 0 + 1 equals E ( y ) for the Pittsburgh plant, the first difference is equal to ( 0 + 1 ) - 0 = 1. Because 0 equals E ( y ) for the Buffalo plant and 0 + 1 equals E ( y ) for the Pittsburgh plant, the first difference is equal to ( 0 + 1 ) - 0 = 1. Because 0 + 2 equals E ( y ) for the Detroit plant, the second difference is equal to ( 0 + 2 ) - 0 = 2. Because 0 + 2 equals E ( y ) for the Detroit plant, the second difference is equal to ( 0 + 2 ) - 0 = 2. We would conclude that there is no difference in the three means if 1 = 0 and 2 = 0. We would conclude that there is no difference in the three means if 1 = 0 and 2 = 0.
41
41 Slide © 2008 Thomson South-Western. All Rights Reserved Multiple Regression Approach to Experimental Design n The null hypothesis for a test of the difference of means is H 0 : 1 = 2 = 0 n To test this null hypothesis, we must compare the value of MSR/MSE to the critical value from an F distribution with the appropriate numerator and denominator degrees of freedom.
42
42 Slide © 2008 Thomson South-Western. All Rights Reserved Multiple Regression Approach to Experimental Design RegressionErrorTotal 49030879821214 24525.667 Source of Variation Sum of Squares Degrees of Freedom MeanSquares 9.55 F ANOVA Table Produced by Excel ANOVA Table Produced by Excel p.003
43
43 Slide © 2008 Thomson South-Western. All Rights Reserved Multiple Regression Approach to Experimental Design n At a.05 level of significance, the critical value of F with k – 1 = 3 – 1 = 2 numerator d.f. and n T – k = 15 – 3 = 12 denominator d.f. is 3.89. n Because the observed value of F (9.55) is greater than the critical value of 3.89, we reject the null hypothesis. Alternatively, we reject the null hypothesis because the p -value of.003 < =.05. Alternatively, we reject the null hypothesis because the p -value of.003 < =.05.
44
44 Slide © 2008 Thomson South-Western. All Rights Reserved Autocorrelation and the Durbin-Watson Test n Often, the data used for regression studies in business and economics are collected over time. n It is not uncommon for the value of y at one time period to be related to the value of y at previous time periods. n In this case, we say autocorrelation (or serial correlation) is present in the data.
45
45 Slide © 2008 Thomson South-Western. All Rights Reserved n With positive autocorrelation, we expect a positive residual in one period to be followed by a positive residual in the next period. n With positive autocorrelation, we expect a negative residual in one period to be followed by a negative residual in the next period. n With negative autocorrelation, we expect a positive residual in one period to be followed by a negative residual in the next period, then a positive residual, and so on. Autocorrelation and the Durbin-Watson Test
46
46 Slide © 2008 Thomson South-Western. All Rights Reserved n When autocorrelation is present, one of the regression assumptions is violated: the error terms are not independent. n When autocorrelation is present, serious errors can be made in performing tests of significance based upon the assumed regression model. n The Durbin-Watson statistic can be used to detect first-order autocorrelation. Autocorrelation and the Durbin-Watson Test
47
47 Slide © 2008 Thomson South-Western. All Rights Reserved n Durbin-Watson Test Statistic A value of two indicates no autocorrelation. A value of two indicates no autocorrelation. If successive values of the residuals are close If successive values of the residuals are close together (positive autocorrelation is present), together (positive autocorrelation is present), the statistic will be small. the statistic will be small. The statistic ranges in value from zero to four. The statistic ranges in value from zero to four. If successive values are far apart (negative If successive values are far apart (negative autocorrelation is present), the statistic will autocorrelation is present), the statistic will be large. be large. Autocorrelation and the Durbin-Watson Test
48
48 Slide © 2008 Thomson South-Western. All Rights Reserved Suppose the values of (residuals) are not independent but are related in the following manner: Suppose the values of (residuals) are not independent but are related in the following manner: where is a parameter with an absolute value less than one and z t is a normally and independently distributed random variable with a mean of zero and variance of 2. We see that if = 0, the error terms are not related. We see that if = 0, the error terms are not related. t = t -1 + z t The Durbin-Watson test uses the residuals to determine whether = 0. The Durbin-Watson test uses the residuals to determine whether = 0. Autocorrelation and the Durbin-Watson Test
49
49 Slide © 2008 Thomson South-Western. All Rights Reserved n The null hypothesis always is: n The alternative hypothesis is: to test for positive autocorrelation to test for negative autocorrelation to test for positive or negative autocorrelation there is no autocorrelation Autocorrelation and the Durbin-Watson Test
50
50 Slide © 2008 Thomson South-Western. All Rights Reserved A Sample Of Critical Values For The Durbin-Watson Test For Autocorrelation Significance Points of d L and d U : =.05 Number of Independent Variables 12345 n dLdLdLdL dUdUdUdU dLdLdLdL dUdUdUdU dLdLdLdL dUdUdUdU dUdUdUdU dUdUdUdU dUdUdUdU dUdUdUdU 151.081.360.951.540.821.750.691.970.562.21 161.101.370.981.540.861.730.741.930.622.15 171.131.381.021.540.901.710.781.900.672.10 181.161.391.051.530.931.690.821.870.712.06 Autocorrelation and the Durbin-Watson Test
51
51 Slide © 2008 Thomson South-Western. All Rights Reserved Positiveautocor-relation Incon-clusive No evidence of positive autocorrelation 0 dLdLdLdL dUdUdUdU 24 4- d L 4- d U Negativeautocor-relation Incon-clusive No evidence of negative autocorrelation 0 dLdLdLdL dUdUdUdU 24 4- d L 4- d U Incon-clusive No evidence of autocorrelation 0 dLdLdLdL dUdUdUdU 24 4- d L 4- d U Incon-clusive Negativeautocor-relation Positiveautocor-relation Autocorrelation and the Durbin-Watson Test
52
52 Slide © 2008 Thomson South-Western. All Rights Reserved Chapter 16 Regression Analysis: Model Building n Multiple Regression Approach to Experimental Design Experimental Design n General Linear Model n Determining When to Add or Delete Variables n Variable-Selection Procedures n Autocorrelation and the Durbin-Watson Test Durbin-Watson Test
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.