Presentation is loading. Please wait.

Presentation is loading. Please wait.

Multiple Regression Models

Similar presentations


Presentation on theme: "Multiple Regression Models"— Presentation transcript:

1 Multiple Regression Models
Chapter 14 Multiple Regression Models Copyright © 2005 Brooks/Cole, a division of Thomson Learning, Inc.

2 Multiple Regression Models
A general additive multiple regression model, which relates a dependent variable y to k predictor variables x1, x2,…, xk is given by the model equation y =  + 1x1 + 2x2 + … + kxk + e Copyright © 2005 Brooks/Cole, a division of Thomson Learning, Inc.

3 Multiple Regression Models
The random deviation e is assumed to be normally distributed with mean value 0 and variance 2 for any particular values of x1, x2,…, xk. This implies that for fixed x1, x2,…, xk values, y has a normal distribution with variance 2 and (mean y value for fixed x1, x2,…, xk values) =  + 1x1 + 2x2 + … + kxk Copyright © 2005 Brooks/Cole, a division of Thomson Learning, Inc.

4 Multiple Regression Models
The i’s are called population regression coefficients; each i can be interpreted as the true average change in y when the predictor xi increases by 1 unit and the values of all the other predictors remain fixed. The deterministic portion + 1x1 + 2x2 + … + kxk is called the population regression function. Copyright © 2005 Brooks/Cole, a division of Thomson Learning, Inc.

5 Polynomial Regression Models
The kth degree polynomial regression model y =  + 1x + 2x2 + … + kxk + e is a special case of the general multiple regression model with x1 = x, x2 = x2, … , xk = xk. The population regression function (mean value of y for fixed values of the predictors) is  + 1x + 2x2 + … + kxk. Copyright © 2005 Brooks/Cole, a division of Thomson Learning, Inc.

6 Polynomial Regression Models
The most important special case other than simple linear regression (k = 1) is the quadratic regression model y = + 1x + 2x2. This model replaces the line y = + x with a parabolic cure of mean values  + 1x + 2x2. If 2 > 0, the curve opens upward, whereas if 2 < 0, the curve opens downward. Copyright © 2005 Brooks/Cole, a division of Thomson Learning, Inc.

7 Copyright © 2005 Brooks/Cole, a division of Thomson Learning, Inc.
Interaction If the change in the mean y value associated with a 1-unit increase in one independent variable depends on the value of a second independent variable, there is interaction between these two variables. When the variables are denoted by x1 and x2, such interaction can be modeled by including x1x2, the product of the variables that interact, as a predictor variable. Copyright © 2005 Brooks/Cole, a division of Thomson Learning, Inc.

8 Qualitative Predictor Variables.
Up to now, we have only considered the inclusion of quantitative (numerical) predictor variables in a multiple regression model. Two other types are very common: Dichotomous variable: One with just two possible categories coded 0 and 1 Examples Gender {male, female} Marriage status {married, not-married} Copyright © 2005 Brooks/Cole, a division of Thomson Learning, Inc.

9 Qualitative Predictor Variables.
Ordinal variables: Categorical variables that have a natural ordering Activity level {light, moderate, heavy} coded respectively as 1, 2 and 3 Education level {none, elementary, secondary, college, graduate} coded respectively 1, 2, 3, 4, 5 (or for that matter any 5 consecutive integers} Copyright © 2005 Brooks/Cole, a division of Thomson Learning, Inc.

10 Least Square Estimates
According to the principle of least squares, the fit of a particular estimated regression function a + b1x1 + b2x2 + … + bkxk to the observed data is measured by the sum of squared deviations between the observed y values and the y values predicted by the estimated function: S[y –(a + b1x1 + b2x2 + … + bkxk )]2 The least squares estimates of , 1, 2,…, k are those values of a, b1, b2, … , bk that make this sum of squared deviations as small as possible. Copyright © 2005 Brooks/Cole, a division of Thomson Learning, Inc.

11 Predicted Values & Residuals
The first predicted value is obtained by taking the values of the predictor variables x1, x2,…, xk for the first sample observation and substituting these values into the estimated regression function. Doing this successively for the remaining observations yields the predicted values (sometimes referred to as the fitted values or fits). Copyright © 2005 Brooks/Cole, a division of Thomson Learning, Inc.

12 Predicted Values & Residuals
The residuals are then the differences between the observed and predicted y values. Copyright © 2005 Brooks/Cole, a division of Thomson Learning, Inc.

13 Copyright © 2005 Brooks/Cole, a division of Thomson Learning, Inc.
Sums of Squares The residual (or error) sum of sqyares, SSResid, and total sum of squares, SSTo, are given by where is the mean of the y observations in the sample. The number of degrees of freedom associated with SSResid is n - (k + 1), because k + 1 df are lost in estimating the k + 1 coefficients , 1, 2,…,k. Copyright © 2005 Brooks/Cole, a division of Thomson Learning, Inc.

14 Copyright © 2005 Brooks/Cole, a division of Thomson Learning, Inc.
Estimate for 2 An estimate of the random deviation variance 2 is given by and is the estimate of . Copyright © 2005 Brooks/Cole, a division of Thomson Learning, Inc.

15 Coefficient of Multiple Determination, R2
The coefficient of multiple determination, R2, interpreted as the proportion of variation in observed y values that is explained by the fitted model, is Copyright © 2005 Brooks/Cole, a division of Thomson Learning, Inc.

16 Copyright © 2005 Brooks/Cole, a division of Thomson Learning, Inc.
Adjusted R2 Generally, a model with large R2 and small se are desirable. If a large number of variables (relative to the number of data points) is used those conditions may be satisfied but the model will be unrealistic and difficult to interpret. Copyright © 2005 Brooks/Cole, a division of Thomson Learning, Inc.

17 Copyright © 2005 Brooks/Cole, a division of Thomson Learning, Inc.
Adjusted R2 To sort out this problem, sometimes computer packages compute a quantity called the adjusted R2, Notice that when a large number of variables are used to build the model, this value will be substantially lower than R2 and give a better indication of usability of the model. Copyright © 2005 Brooks/Cole, a division of Thomson Learning, Inc.

18 Copyright © 2005 Brooks/Cole, a division of Thomson Learning, Inc.
F Distributions F distributions are similar to a Chi-Square distributions, but have two parameters, dfden and dfnum. Copyright © 2005 Brooks/Cole, a division of Thomson Learning, Inc.

19 The F Test for Model Utility
The regression sum of squares denoted by SSReg is defined by SSREG = SSTo - SSresid Copyright © 2005 Brooks/Cole, a division of Thomson Learning, Inc.

20 The F Test for Model Utility
When all k i’s are zero in the model y =  + 1x1 + 2x2 + … + kxk + e And when the distribution of e is normal with mean 0 and variance 2 for any particular values of x1, x2,…, xk, the statistic has an F probability distribution based on k numerator df and n - (K+ 1) denominator df Copyright © 2005 Brooks/Cole, a division of Thomson Learning, Inc.

21 The F Test for Utility of the Model y =  + 1x1 + 2x2 + … + kxk + e
Null hypothesis: H0: 1 = 2 = … = k =0 (There is no useful linear relationship between y and any of the predictors.) Alternate hypothesis: Ha: At least one among 1, 2, … , k is not zero (There is a useful linear relationship between y and at least one of the predictors.) Copyright © 2005 Brooks/Cole, a division of Thomson Learning, Inc.

22 The F Test for Utility of the Model y =  + 1x1 + 2x2 + … + kxk + e
Test statistic: An alternate formula: Copyright © 2005 Brooks/Cole, a division of Thomson Learning, Inc.

23 The F Test Utility of the Model y =  + 1x1 + 2x2 + … + kxk + e
The test is upper-tailed, and the information in the Table of Values that capture specified upper-tail F curve areas is used to obtain a bound or bounds on the P-value using numerator df = k and denominator df = n - (k + 1). Assumptions: For any particular combination of predictor variable values, the distribution of e, the random deviation, is normal with mean 0 and constant variance. Copyright © 2005 Brooks/Cole, a division of Thomson Learning, Inc.

24 Copyright © 2005 Brooks/Cole, a division of Thomson Learning, Inc.
Example A number of years ago, a group of college professors teaching statistics met at an NSF program and put together a sample student research project. They attempted to create a model to explain lung capacity in terms of a number of variables. Specifically, Numerical variables: height, age, weight, waist Categorical variables: gender, activity level and smoking status. Copyright © 2005 Brooks/Cole, a division of Thomson Learning, Inc.

25 Copyright © 2005 Brooks/Cole, a division of Thomson Learning, Inc.
Example They managed to sample 41 subjects and obtain/measure the variables. There was some discussion and many felt that the calculated variable (height)(waist)2 would be useful since it would likely be proportional to the volume of the individual. The initial regression analysis performed with Minitab appears on the next slide. Copyright © 2005 Brooks/Cole, a division of Thomson Learning, Inc.

26 Example Linear Model with All Numerical Variables
The regression equation is Capacity = Age Height Weight Chest Waist hw2 40 cases used 1 cases contain missing values Predictor Coef SE Coef T P Constant Age Height Weight Chest Waist hw S = R-Sq = 78.2% R-Sq(adj) = 74.2% Copyright © 2005 Brooks/Cole, a division of Thomson Learning, Inc.

27 Copyright © 2005 Brooks/Cole, a division of Thomson Learning, Inc.
Example The only coefficient that appeared to be significant and the 5% level was the height. Since the P-value for the coefficient on the age was very close to 5% (5.2%) it was decided that a linear model with the two independent variables height and age would be calculated. The resulting model is on the next slide. Copyright © 2005 Brooks/Cole, a division of Thomson Learning, Inc.

28 Example Linear Model with variables: Height & Age
Notice that even though the R2 value decreases slightly, the adjusted R2 value actually increases. Also note that the coefficient on Age is now significant at 5%. The regression equation is Capacity = Height Age 40 cases used 1 cases contain missing values Predictor Coef SE Coef T P Constant Height Age S = R-Sq = 77.2% R-Sq(adj) = 76.0% Copyright © 2005 Brooks/Cole, a division of Thomson Learning, Inc.

29 Copyright © 2005 Brooks/Cole, a division of Thomson Learning, Inc.
Example In an attempt to determine if incorporating the categorical variables into the model would significantly enhance the it. Gender was coded as an indicator variable (male = 0 and female = 1), Smoking was coded as an indicator variable (No = 0 and Yes = 1), and Activity level (light, moderate, heavy) was coded respectively as 1, 2 and 3. The resulting Minitab output is given on the next slide. Copyright © 2005 Brooks/Cole, a division of Thomson Learning, Inc.

30 Example Linear Model with categorical variables added
The regression equation is Capacity = Height Age C-Gender C-Activity C-Smoke 37 cases used 4 cases contain missing values Predictor Coef SE Coef T P Constant Height Age C-Gender C-Activi C-Smoke S = R-Sq = 84.2% R-Sq(adj) = 81.7% Copyright © 2005 Brooks/Cole, a division of Thomson Learning, Inc.

31 Copyright © 2005 Brooks/Cole, a division of Thomson Learning, Inc.
Example It was noted that coefficient for the coded indicator variables gender and smoking were not significant, but after considerable discussion, the group felt that a number of the variables were related. This, the group felt, was confounding the study. In an attempt to determine a reasonable optimal subgroup of the variables to keep in the study, it was noted that a number of the variables were highly related. Since the study was small, a stepwise regression was run and the variables, Height, Age, Coded Activity, Coded Gender were kept and the following model was obtained. Copyright © 2005 Brooks/Cole, a division of Thomson Learning, Inc.

32 Example Linear Model with Height, Age & Coded Activity and Gender
The regression equation is Capacity = Height Age C-Activity C-Gender 40 cases used 1 cases contain missing values Predictor Coef SE Coef T P Constant Height Age C-Activi C-Gender S = R-Sq = 83.2% R-Sq(adj) = 81.3% Copyright © 2005 Brooks/Cole, a division of Thomson Learning, Inc.

33 Example Linear Model with Height, Age & Coded Activity and Gender
The rest of the Minitab output is given below. Analysis of Variance Source DF SS MS F P Regression Residual Error Total Source DF Seq SS Height Age C-Activi C-Gender Unusual Observations Obs Height Capacity Fit SE Fit Residual St Resid R R R R denotes an observation with a large standardized residual Copyright © 2005 Brooks/Cole, a division of Thomson Learning, Inc.

34 Example Linear Model with Height, Age & Coded Activity and Gender
All of the coefficients in this model were significant at the 5% level and the R2 and adjusted R2 were both fairly large. This appeared to be a reasonable model for describing lung capacity even though the study was limited by sample size, and measurement limitations due to antique equipment. Minitab identified 3 outliers (because the standardized residuals were unusually large. Various plots of the standardized residuals are produced on the next few slides with comments Copyright © 2005 Brooks/Cole, a division of Thomson Learning, Inc.

35 Example Linear Model with Height, Age & Coded Activity and Gender
The histogram of the residuals appears to be consistent with the assumption that the residuals are a sample from a normal distribution. Copyright © 2005 Brooks/Cole, a division of Thomson Learning, Inc.

36 Example Linear Model with Height, Age & Coded Activity and Gender
The normality plot also tends to indicate the residuals can reasonably be thought to be a sample from a normal distribution. Copyright © 2005 Brooks/Cole, a division of Thomson Learning, Inc.

37 Example Linear Model with Height, Age & Coded Activity and Gender
The residual plot also tends to indicate that the model assumptions are not unreasonable, although there would be some concern that the residuals are predominantly positive for smaller fitted lung capacities. Copyright © 2005 Brooks/Cole, a division of Thomson Learning, Inc.


Download ppt "Multiple Regression Models"

Similar presentations


Ads by Google