Download presentation

Presentation is loading. Please wait.

Published byDeasia Woliver Modified over 2 years ago

1
Multiple Regression Chapter 18

2
18.1 Introduction In this chapter we extend the simple linear regression model, and allow for any number of independent variables. We expect to build a model that fits the data better than the simple linear regression model.

3
We will use computer printout to –Assess the model How well it fits the data Is it useful Are any required conditions violated? –Employ the model Interpreting the coefficients Predictions using the prediction equation Estimating the expected value of the dependent variable

4
Coefficients Dependent variableIndependent variables Random error variable 18.2 Model and Required Conditions We allow for k independent variables to potentially be related to the dependent variable y = 0 + 1 x 1 + 2 x 2 + …+ k x k +

5
y = 0 + 1 x X y X2X2 1 The simple linear regression model allows for one independent variable, “x” y = 0 + 1 x + The multiple linear regression model allows for more than one independent variable. Y = 0 + 1 x 1 + 2 x 2 + Note how the straight line becomes a plain, and... y = 0 + 1 x 1 + 2 x 2

6
X y X2X2 1 … a parabola becomes a parabolic surface y= b 0 + b 1 x 2 y = b 0 + b 1 x b 2 x 2 b0b0

7
Required conditions for the error variable –The error is normally distributed with mean equal to zero and a constant standard deviation (independent of the value of y). is unknown. –The errors are independent. These conditions are required in order to –estimate the model coefficients, –assess the resulting model.

8
–If the model passes the assessment tests, use it to interpret the coefficients and generate predictions. –Assess the model fit and usefulness using the model statistics. –Diagnose violations of required conditions. Try to remedy problems when identified Estimating the Coefficients and Assessing the Model The procedure –Obtain the model coefficients and statistics using a statistical computer software.

9
–La Quinta Motor Inns is planning an expansion. –Management wishes to predict which sites are likely to be profitable. –Several areas where predictors of profitability can be identified are: Competition Market awareness Demand generators Demographics Physical quality Example 18.1 Where to locate a new motor inn?

10
Profitability Competition Market awareness CustomersCommunity Physical Margin RoomsNearestOffice space College enrollment IncomeDisttwn Distance to downtown. Median household income. Distance to the nearest La Quinta inn. Number of hotels/motels rooms within 3 miles from the site.

11
–Data was collected from randomly selected 100 inns that belong to La Quinta, and ran for the following suggested model: Margin = Rooms Nearest Office College + 5 Income + 6 Disttwn +

12
Excel output This is the sample regression equation (sometimes called the prediction equation) MARGIN = ROOMS NEAREST OFFICE COLLEGE INCOME DISTTWN Let us assess this equation

13
Standard error of estimate –We need to estimate the standard error of estimate –Compare s to the mean value of y From the printout, Standard Error = Calculating the mean value of y we have –It seems s is not particularly small. –Can we conclude the model does not fit the data well?

14
Coefficient of determination –The definition is –From the printout, R 2 = –52.51% of the variation in the measure of profitability is explained by the linear regression model formulated above. –When adjusted for degrees of freedom, Adjusted R 2 = 1-[SSE/(n-k-1)] / [SS(Total)/(n-1)] = = 49.44%

15
Testing the validity of the model –We pose the question: Is there at least one independent variable linearly related to the dependent variable? –To answer the question we test the hypothesis H 0 : 1 = 2 = … = k = 0 H 1 : At least one i is not equal to zero. –If at least one i is not equal to zero, the model is valid.

16
To test these hypotheses we perform an analysis of variance procedure. The F test –Construct the F statistic –Rejection region F>F ,k,n-k-1 MSE MSR F MSR=SSR/k MSE=SSE/(n-k-1) [Variation in y] = SSR + SSE. Large F results from a large SSR. Then, much of the variation in y is explained by the regression model. The null hypothesis should be rejected; thus, the model is valid. Required conditions must be satisfied.

17
Excel provides the following ANOVA results Example continued SSE SSR MSE MSR MSR/MSE

18
Excel provides the following ANOVA results Example continued F ,k,n-k-1 = F 0.05,6, =2.17 F = > 2.17 Also, the p-value (Significance F) = (10) -13 Clearly, = 0.05> (10) -13, and the null hypothesis is rejected. Conclusion: There is sufficient evidence to reject the null hypothesis in favor of the alternative hypothesis. At least one of the i is not equal to zero. Thus, at least one independent variable is linearly related to y. This linear regression model is valid

19
Let us interpret the coefficients – This is the intercept, the value of y when all the variables take the value zero. Since the data range of all the independent variables do not cover the value zero, do not interpret the intercept. – In this model, for each additional 1000 rooms within 3 mile of the La Quinta inn, the operating margin decreases on the average by 7.6% (assuming the other variables are held constant).

20
– In this model, for each additional mile that the nearest competitor is to La Quinta inn, the average operating margin decreases by 1.65% – For each additional 1000 sq-ft of office space, the average increase in operating margin will be.02%. – For additional thousand students MARGIN increases by.21%. – For additional $1000 increase in median household income, MARGIN decreases by.41% – For each additional mile to the downtown center, MARGIN increases by.23% on the average

21
Testing the coefficients –The hypothesis for each i –Excel printout H 0 : i = 0 H 1 : i = 0 Test statistic d.f. = n - k -1

22
Using the linear regression equation –The model can be used by Producing a prediction interval for the particular value of y, for a given set of values of x i. Producing an interval estimate for the expected value of y, for a given set of values of x i. –The model can be used to learn about relationships between the independent variables x i, and the dependent variable y, by interpreting the coefficients i

23
Example continued. Produce predictions –Predict the MARGIN of an inn at a site with the following characteristics: 3815 rooms within 3 miles, Closet competitor 3.4 miles away, 476,000 sq-ft of office space, 24,500 college students, $39,000 median household income, 3.6 miles distance to downtown center. MARGIN = (3815) (3.4) ( 476) (24.5) ( 39) (3.6) = 37.1%

24
The required conditions for the model assessment to apply must be checked. –Is the error variable normally distributed? –Is the error variance constant? –Are the errors independent? –Can we identify outliers? –Is multicollinearity a problem? 18.4 Regression Diagnostics - II Draw a histogram of the residuals Plot the residuals versus y ^ Plot the residuals versus the time periods

25
Example 18.2 House price and multicollinearity –A real estate agent believes that a house selling price can be predicted using the house size, number of bedrooms, and lot size. –A random sample of 100 houses was drawn and data recorded. –Analyze the relationship among the four variables

26
Solution The proposed model is PRICE = 0 + 1 BEDROOMS + 2 H-SIZE + 3 LOTSIZE + –Excel solution The model is valid, but no variable is significantly related to the selling price !!

27
–when regressing the price on each independent variable alone, it is found that each variable is strongly related to the selling price. –Multicollinearity is the source of this problem. Multicollinearity causes two kinds of difficulties: –The t statistics appear to be too small. –The coefficients cannot be interpreted as “slopes”. However,

28
Remedying violations of the required conditions – Nonnormality or heteroscedasticity can be remedied using transformations on the y variable. –The transformations can improve the linear relationship between the dependent variable and the independent variables. –Many computer software systems allow us to make the transformations easily.

29
A brief list of transformations »y’ = log y (for y > 0) Use when the s increases with y, or Use when the error distribution is positively skewed »y’ = y 2 Use when the s 2 is proportional to E(y), or Use when the error distribution is negatively skewed »y’ = y 1/2 (for y > 0) Use when the s 2 is proportional to E(y) »y’ = 1/y Use when s 2 increases significantly when y increases beyond some value.

30
Example 18.3: Analysis, diagnostics, transformations. –A statistics professor wanted to know whether time limit affect the marks on a quiz? –A random sample of 100 students was split into 5 groups. –Each student wrote a quiz, but each group was given a different time limit. See data below. MarksMarks Analyze these results, and include diagnostics

31
This model is useful and provides a good fit. The errors seem to be normally distributed The model tested: MARK = 0 + 1 TIME +

32
The standard error of estimate seems to increase with the predicted value of y. Two transformations are used to remedy this problem: 1. y’ = log e y 2. y’ = 1/y

33
Let us see what happens when a transformation is applied 40,18 40,23 40, , 2.89 Log e 23 = Log e 18 = 2.89 The original data, where “Mark” is a function of “Time” The modified data, where LogMark is a function of “Time"

34
The new regression analysis and the diagnostics are: The model tested: LOGMARK = ’ 0 + ’ 1 TIME + ’ Predicted LogMark = Time This model is useful and provides a good fit.

35
The errors seem to be normally distributed The standard errors still changes with the predicted y, but the change is smaller than before.

36
Let TIME = 55 minutes LogMark = Time = (55) = To find the predicted mark, take the antilog: antilog e = e = How do we use the modified model to predict?

37
18.5 Regression Diagnostics - III The Durbin - Watson Test –This test detects first order auto-correlation between consecutive residuals in a time series –If autocorrelation exists the error variables are not independent Residual at time i

38
Residuals Time Positive first order autocorrelation occurs when consecutive residuals tend to be similar. Then, the value of d is small (less than 2). Positive first order autocorrelation Negative first order autocorrelation Residuals Time + Negative first order autocorrelation occurs when consecutive residuals tend to markedly differ. Then, the value of d is large (greater than 2).

39
One tail test for positive first order auto-correlation –If d

40
Two-tail test for first order auto-correlation –If d 4-d L first order auto-correlation exists –If d falls between d L and d U or between 4-d U and 4-d L the test is inconclusive –If d falls between d U and 4-d U there is no evidence for first order auto-correlation dLdL dUdU d U 4-d L First order correlation exists First order correlation exists Inconclusive test Inconclusive test First order correlation does not exist First order correlation does not exist

41
–How does the weather affect the sales of lift tickets in a ski resort? –Data of the past 20 years sales of tickets, along with the total snowfall and the average temperature during Christmas week in each year, was collected. –The model hypothesized was TICKETS = 0 + 1 SNOWFALL + 2 TEMPERATURE+ –Regression analysis yielded the following results: Example 18.4

42
The model seems to be very poor: The model seems to be very poor: The fit is very low (R-square=0.12), It is not valid (Signif. F =0.33) No variable is linearly related to Sales Diagnosis of the required conditions resulted with the following findings Diagnosis of the required conditions resulted with the following findings

43
Residual over time Residual vs. predicted y The errors are not independent The error variance is constant The errors may be normally distributed The error distribution

44
Test for positive first order auto-correlation: n=20, k=2. From the Durbin-Watson table we have: d L =1.10, d U =1.54. The statistic d=0.59 Conclusion: Because d

45
The modified regression model TICKETS = 0 + 1 SNOWFALL + 2 TEMPERATURE + 3 YEARS + The autocorrelation has occurred over time. Therefore, a time dependent variable added to the model may correct the problem All the required conditions are met for this model. The fit of this model is high R 2 = The model is useful. Significance F = 5.93 E-5. SNOWFALL and YEARS are linearly related to ticket sales. TEMPERATURE is not linearly related to ticket sales.

Similar presentations

© 2017 SlidePlayer.com Inc.

All rights reserved.

Ads by Google