Download presentation

Presentation is loading. Please wait.

Published byCeline Sandell Modified about 1 year ago

1
Session 6

2
Applied Regression -- Prof. Juran2 Outline Residual Analysis Are they normal? Do they have a common variance? Multicollinearity Autocorrelation, serial correlation

3
Applied Regression -- Prof. Juran3 Residual Analysis Assumptions about regression models: The Form of the Model The Residual Errors The Predictor Variables The Data

4
Applied Regression -- Prof. Juran4 Regression Assumptions Recall the assumptions about regression models: The Form of the Model The relationship between Y and each X is assumed to be linear.

5
Applied Regression -- Prof. Juran5 The Residual Errors The residuals are normally distributed. The residuals have a mean of zero. The residuals have the same variance. The residuals are independent of each other.

6
Applied Regression -- Prof. Juran6 The Predictor Variables The X variables are nonrandom (i.e. fixed or selected in advance). This assumption is rarely true in business regression analysis. The data are measured without error. This assumption is rarely true in business regression analysis. The X variables are linearly independent of each other (uncorrelated, or orthogonal). This assumption is rarely true in business regression analysis.

7
Applied Regression -- Prof. Juran7 The Data The observations are equally reliable and have equal weights in determining the regression model.

8
Applied Regression -- Prof. Juran8 Because many of these assumptions center on the residuals, we need to spend some time studying the residuals in our model, to assess the degree to which these assumptions are valid.

9
Applied Regression -- Prof. Juran9 Example: Anscombe’s Quartet Here are four bivariate data sets, devised by F. J. Anscombe. Anscombe, F. J. (1973), “Graphs in Statistical Analysis,” The American Statistician, 27,

10
Applied Regression -- Prof. Juran10

11
Applied Regression -- Prof. Juran11

12
Applied Regression -- Prof. Juran12

13
Applied Regression -- Prof. Juran13

14
Applied Regression -- Prof. Juran14

15
Applied Regression -- Prof. Juran15 Three observations: 1.These data sets are clearly different from each other. 2.The differences would not be made obvious by any descriptive statistics or summary regression statistics. 3.We need tools to identify characteristics such as those which differentiate these four data sets.

16
Applied Regression -- Prof. Juran16 The differences can be detected in the different ways that these data sets violate the basic regression assumptions regarding residual errors.

17
Applied Regression -- Prof. Juran17 Assumption: The residuals have a mean of zero. This assumption is not likely to be a problem, because the regression procedure ensures that this will be true, unless there is a serious skewness problem.

18
Applied Regression -- Prof. Juran18 Assumption: The residuals are normally distributed. We can check this with a number of methods. We might plot a histogram of the residuals to see if they “look” reasonably normal. For this purpose we might want to “standardize” the residuals, so that their values can be compared with our expectations in terms of the standard error.

19
Applied Regression -- Prof. Juran19 Standardized Residuals In order to judge whether residuals are outliers or have an inordinate impact on the regression they are commonly standardized. The variance of the i th residual e i, perhaps surprisingly, is not though this is in many examples a reasonable approximation.

20
Applied Regression -- Prof. Juran20 The correct variance is One way to go, therefore, is to calculate the so-called standardized residual for each observation: Alternatively, we could use the so-called studentized residuals:

21
Applied Regression -- Prof. Juran21 These are both measures of how far individual observations are from their predicted values, and large values of either are signals of concern. Excel (and any other stats software package) produces standardized residuals on command.

22
Applied Regression -- Prof. Juran22

23
Applied Regression -- Prof. Juran23 Another way to assess normality is to use a normal probability plot, which graphs the distribution of residuals against what we would expect to see from a standard normal distribution. The normal score is calculated using the following procedure: 1.Order the observations in increasing order of their residual errors. 2.Calculate a quantile, which basically measures what proportion of the data lie below each observation. 3.Calculate the normal score, which is a measure of where we would expect the quantiles to be if we drew a sample of this size from a perfect standard normal distribution.

24
Applied Regression -- Prof. Juran24

25
Applied Regression -- Prof. Juran25

26
Applied Regression -- Prof. Juran26

27
Applied Regression -- Prof. Juran27 Trouble! Excel gives us a normal probability plot for the dependent variable, not the residuals We have never assumed that Y is normally distributed Another reason to switch to Minitab, SAS, SPSS, etc.

28
Applied Regression -- Prof. Juran28

29
Applied Regression -- Prof. Juran29 Assumption: The residuals have the same variance. One way to check this is to plot the actual values of Y against the predicted values. In the case of simple regression, this is a lot like plotting them against the X variable.

30
Applied Regression -- Prof. Juran30

31
Applied Regression -- Prof. Juran31 Another method is to plot the residuals against the predicted value of Y (or the actual observed value of Y, or in simple regression against the X variable):

32
Applied Regression -- Prof. Juran32 Collinearity Collinearity (also called multicollinearity ) is the situation in which one or more of the predictor variables are nearly a linear combination of other predictors. (The opposite condition — in which all independent variables are more or less independent — is called orthogonality.)

33
Applied Regression -- Prof. Juran33 In the extreme case of exact dependence, the X T X matrix cannot be inverted and the regression procedure will fail. In less extreme cases, we suffer from several possible problems: 1.The independent variables are not “independent”. We can’t talk about the slope coefficients in terms of effects of one variable on Y “all other things held constant”, because changes in one of the X variables are associated with expected changes in other X variables. 2.The slope coefficient values can be very sensitive to changes in the data, and/or which other independent variables are included in the model. 3.Forecasting problems: Large standard errors for all parameters Uncertainty about whether true relationships have been detected Uncertainty about the stability of the correlation structure

34
Applied Regression -- Prof. Juran34 Sources of Collinearity Data collection method. Some combination of X variable values does not exist in the data. Example: Say that we did the tool wear case without ever trying the Type A machine at low speed or the Type B machine at high speed. Collinearity here is the result of the experimental design.

35
Applied Regression -- Prof. Juran35 Sources of Collinearity Constraints on the Model or in the Population. Some combination of X variable values does not exist in the population. Example: In the cigarette data, imagine if the states with a high proportion of high school graduates also had a high proportion of black citizens. Collinearity here is the result of attributes of the population.

36
Applied Regression -- Prof. Juran36 Sources of Collinearity Model Specification. Adding or including variables that are tightly correlated with other variables already in the model. Example: In a study to predict the profitability of TV programs, we might include both the Nielsen rating and the Nielsen share. Collinearity here is the result of including multiple variables that contain more or less the same information.

37
Applied Regression -- Prof. Juran37 Sources of Collinearity Over-definition. We may have a relatively small number of observations, but a large number of independent variables for each. Collinearity here is the result of too few degrees of freedom. In other words, n – p – 1 is small (or in the extreme, negative), because p is large compared with n.

38
Applied Regression -- Prof. Juran38 Detecting Collinearity First, be aware of the potential problem, and be vigilant. Second, check the various combinations of independent variables for obvious evidence of collinearity. This might include pairwise correlation analysis, or even regressing each independent variable against all of the others. A high R -square coefficient would be a sign of trouble.

39
Applied Regression -- Prof. Juran39 Detecting Collinearity Third, after a regression model has been estimated, watch for these clues: Large changes in a coefficient as an independent variable is added or removed. Large changes in a coefficient as an observation is added or removed. Inappropriate signs or magnitudes of an estimated coefficient as compared to common sense or prior expectations. The Variance Inflation Factor (VIF) is one measure of collinearity’s impact.

40
Applied Regression -- Prof. Juran40 Variance Inflation Factor

41
Applied Regression -- Prof. Juran41 Countermeasures Design as much orthogonality into the data as you can. You may improve a pre-existing situation by collecting additional data, as orthogonally as possible. Exclude variables from the model that you know are correlated. Principal Components Analysis: Basically creating a small set of new independent variables, each of which is a linear combination of the larger set of original independent variables (Ch. 9.5, RABE).

42
Applied Regression -- Prof. Juran42 Countermeasures In some cases, rescaling and centering the data can diminish the collinearity. For example, we can translate each observation into a z -stat (by subtracting the mean and dividing by the standard deviation).

43
Applied Regression -- Prof. Juran43 Collinearity in the Supervisor Data

44
Applied Regression -- Prof. Juran44

45
Applied Regression -- Prof. Juran45

46
Applied Regression -- Prof. Juran46

47
Applied Regression -- Prof. Juran47 Cars

48
Applied Regression -- Prof. Juran48 New model: Dependent variable is Volkswagen.

49
Applied Regression -- Prof. Juran49 Reduced Volkswagen model:

50
Applied Regression -- Prof. Juran50 42 cars in the data set, 29 represented by the dummy variables above. 13 remaining, of which 5 are VW.

51
Applied Regression -- Prof. Juran51 Some Minitab Output Regression Analysis: MSRP versus MPG City, HP, Trunk, Warranty, Audi, Chevrolet,... The following terms cannot be estimated and were removed: Saturn, Volkswagen, AWD Analysis of Variance Source DF Adj SS Adj MS F-Value P-Value Regression MPG City HP Trunk Warranty Audi Chevrolet Chrysler Ford Honda Lexus Mazda Nissan Toyota FWD RWD Error Total Adjusted sums of squares are the additional sums of squares determined by adding each particular term to the model given the other terms are already in the model.

52
Applied Regression -- Prof. Juran52 Model Summary S R-sq R-sq(adj) R-sq(pred) % 92.43% 88.33% Coefficients Term Coef SE Coef T-Value P-Value VIF Constant MPG City HP Trunk Warranty Audi Chevrolet Chrysler Ford Honda Lexus Mazda Nissan Toyota FWD RWD

53
Applied Regression -- Prof. Juran53 (A.k.a. Autocorrelation) Here we are concerned with the assumption that the residuals are independent of each other. In particular, we are suspicious that the sequential residuals have a positive correlation. In other words, some information about an observed value of the dependent variable is contained in the previous observation. Serial Correlation

54
Applied Regression -- Prof. Juran54 Consider the following historical data set, in which the dependent variable is Consumer Expenditure and the independent variable is Money Stock. (Economists are interested in the effect of Money Stock on Expenditure, because if it is significant it presents an opportunity to influence the economy through public policy.)

55
Applied Regression -- Prof. Juran55

56
Applied Regression -- Prof. Juran56

57
Applied Regression -- Prof. Juran57

58
Applied Regression -- Prof. Juran58

59
Applied Regression -- Prof. Juran59

60
Applied Regression -- Prof. Juran60

61
Applied Regression -- Prof. Juran61

62
Applied Regression -- Prof. Juran62

63
Applied Regression -- Prof. Juran63 Summary Residual Analysis Are they normal? Do they have a common variance? Multicollinearity Autocorrelation, serial correlation

64
Applied Regression -- Prof. Juran64 For Session 7 Practice the Excel array functions –Do a full multiple regression model of the cigarette data: –Replicate the regression results using matrix algebra –OK to this one to TAs Artsy case

Similar presentations

© 2017 SlidePlayer.com Inc.

All rights reserved.

Ads by Google