# Multiple Linear Regression n Multiple Regression Model n

- Slides: 46

Multiple Linear Regression n Multiple Regression Model n n A regression model that contains more than one regressor variable. Multiple Linear Regression Model n A multiple regression model that is a linear function of the unknown parameters b 0, b 1, b 2, and so on. Examples: n Nonlinear: n Multiple Regression 1

Intercept: b 0 Partial regression coefficients: b 1, b 2 Multiple Regression 2

Interaction: b 12 can be viewed analyzed as a new parameter b 3 (Replace x 12 by a new variable x 3) Multiple Regression 3

Interaction: b 11 can be viewed analyzed as a new parameter b 3 (Replace x 2 by a new variable x 3) Multiple Regression 4

Topics 1. Least Squares Estimation of the Parameters 2. Matrix Approach to Multiple Linear Regression 3. The Covariance Matrix 4. Hypothesis Tests 5. Confidence Intervals 6. Predictions 7. Model Adequacy 8. Polynomial Regression Models 9. Indicator Variables 10. Selection of Variables in Multiple Regression 11. Multicollinearity Multiple Regression 5

A Multiple Regression Analysis n A multiple regression analysis involves estimation, testing, and diagnostic procedures designed to fit the multiple regression model to a set of data. The Method of Least Squares The prediction equation is the line that minimizes SSE, the sum of squares of the deviations of the observed values y from the predicted values Multiple Regression 6

Least Squares Estimation The least square function is The estimates of b 0, b 1, …, bk must satisfy and Multiple Regression 7

Matrix Approach (I) y= X= 1 1. . . 1 Multiple Regression 8

Matrix Approach (II) Since Therefore and Multiple Regression 9

Multiple Regression 10

Multiple Regression 11

Computer Output for the Example Multiple Regression 12

Estimation of s 2 Covariance matrix Multiple Regression 13

Multiple Regression 14

The Analysis of Variance for Multiple Regression The analysis of variance divides the total variation in the response variable y, n n n into two portions: SSR (sum of squares for regression) measures the amount of variation explained by using the regression equation. SSE (sum of squares for error) measures the residual variation in the data that is not explained by the independent variables. The values must satisfy the equation Total SS = SR + SSE. There are (n - 1) degrees of freedom. There are k regression degrees of freedom. There are (n – p) degrees of freedom for error. MS = SS / d f Multiple Regression 15

n n The example ANOVA table: The conditional or sequential sums of squares each account for one of the k = 4 regression degrees of freedom. Testing the Usefulness of the Regression Model In multiple regression, there is more than one partial slope—the partial regression coefficients. The t and F tests are no longer equivalent. Multiple Regression 16

n The Analysis of Variance F Test Is the regression equation that uses the information provided by the predictor variables x 1, x 2, …, xk substantially better than the simple predictor that does not rely on any of the x-values? - This question is answered using an overall F test with the hypotheses At least one of b 1, b 2, …, b k is not 0. - The test statistic is found in the ANOVA table as F = MSR / MSE. n The Coefficient of Determination, R 2 - The regression printout provides a statistical measure of the strength of the model in the coefficient of determination. - The coefficient of determination is sometimes called multiple R 2 Multiple Regression 17

- The F statistic is related to R 2 by the formula n so that when R 2 is large, F is large, and vice versa. Interpreting the Results of a Significant Regression Testing the Significance of a Partial Regression Coefficients - The individual t test in the first section of the regression printout are designed to test the hypotheses: for each of the partial regression coefficients, given that the other predictor variables are already in the model. - These tests are based on the Student’s t statistic given by which has d f = (n - p) degrees if freedom. Multiple Regression 18

The Adjusted Value of R 2 - An alternative measure of the strength of the regression model is adjusted for degrees of freedom by using mean squares rather than sums of squares: - An alternative measure if the strength of the regression model is adjusted for degrees of freedom by using mean squares rather than sums of squares: - For the real estate data in Figure 13. 3, which is provided right next to “R-Sq(adj). ” Multiple Regression 19

Tests and Confidence Interval on Individual Regression Coefficients • Example 11 -5 and 11 -6, pp. 510~513 • Marginal Test Vs. Significance Test Multiple Regression 20

Confidence Interval on the Mean Response Multiple Regression 21

PREDICTION OF NEW OBSERVATIONS Multiple Regression 22

Multiple Regression 23

Measures of Model Adequacy n Coefficient of Multiple Determination n Residual Analysis n n Standardized Residuals n Studentized Residuals Influential Observations n Cook Distance Measure Multiple Regression 24

Coefficient of Multiple Determination Multiple Regression 25

Studentized Residuals Multiple Regression 26

Influential Observations Multiple Regression 27

Cook’s Distance Multiple Regression 28

Multiple Regression 29

The Analysis Procedure n When you perform multiple regression analysis, use a step-bystep approach: 1. Obtain the fitted prediction model. 2. Use the analysis of variance F test and R 2 to determine how well the model fits the data. 3. Check the t tests for the partial regression coefficients to see which ones are contributing significant information in the presence of the others. 4. If you choose to compare several different models, use R 2(adj) to compare their effectiveness 5. Use-computer generated residual plots to check for violation Multiple Regression 30

A Polynomial Regression Model n n The quadratic model is an example of a second-order model because it involves a term whose components sum to 2 (in this case, x 2 ). It is also an example of a polynomial model—a model that takes the form Example 11 -13, pp. 530 -531 Multiple Regression 31

Using Quantitative and Qualitative Predictor Variables in a Regression Model n n n The response variable y must be quantitative. Each independent predictor variable can be either a quantitative or a qualitative variable, whose levels represent qualities or characteristics and can only be categorized. We can allow a combination of different variables to be in the model, and we can allow the variables to interact. A quantitative variable x can be entered as a linear term, x, or to some higher power such as x 2 or x 3. You could use the first-order model: Multiple Regression 32

n n n We can add an interaction term and create a second-order model: Qualitative predictor variable are entered into a regression model through dummy or indicator variables. If each employee included in a study belongs to one of three ethnic groups—say, A, B, or C—you can enter the qualitative variable “ethnicity” into your model using two dummy variables: Multiple Regression 33

n n The model allows a different average response for each group. b 1 measures the difference in the average responses between groups B and A, while b 2 measures the difference between groups C and A. When a qualitative variable involves k categories, (k - 1) dummy variables should be added to the regression model. Example 11 -14, pp. 534~536 <different approach> Multiple Regression 34

Testing Sets of Regression Coefficients n n n Suppose the demand y may be related to five independent variables, but that the cost of measuring three of them is very high. If it could be shown that these three contribute little or no information, they can be eliminated. You want to test the null hypothesis H 0 : b 3 = b 4 = b 5 = 0— that is, the independent variables x 3, x 4, and x 5 contribute no infor-mation for the prediction of y—versus the alternative hypothesis: H 1 : At least one of the parameters b 3, b 4, or b 5 differs from 0 —that is, at least one of the variables x 3, x 4, or x 5 contributes information for the prediction of y. Multiple Regression 35

n To explain how to test a hypothesis concerning a set of model parameters, we define two models: Model One (reduced model) Model Two (complete model) terms in model 1 n additional terms in model 2 The test of the null hypothesis versus the alternative hypothesis H 1 : At least one of the parameters differs from 0 Multiple Regression 36

uses the test statistic where F is based on d f 1 = (k - r ) and d f 2 = n (k + 1). n The rejection region for the test is identical to the rejection for all of the analysis of variance F tests, namely Multiple Regression 37

Interpreting Residual Plots n The variance of some types of data changes as the mean changes: - Poisson data exhibit variation that increases with the mean. - Binomial data exhibit variation that increases for values of p 1. 0. n from. 0 to. 5, and then decreases for values of p from. 5 to Residual plots for these types of data have a pattern similar to that shown in the next pages. Multiple Regression 38

Plots of residuals against Multiple Regression 39

n n If the range of the residuals increases and you know that the data are measurements of Poisson variables, you can stabilize the variance of the response by running the regression analysis on If the percentages are calculated from binomial data, you can use the arcsin transformation, If E(y) and a single independent variable x are linearly related, and you fit a straight line to the data, then the observed y values should vary in a random manner about and a plot of the residuals against x will appear as shown in the next page. If you had incorrectly used a linear model to fit the data, the residual plot would show that the unexplained variation exhibits a curved pattern, which suggests that there is a quadratic effect that has not been included in the model. Multiple Regression 40

Figure 13. 17 Residual plot when the model provides a good approximation to reality Multiple Regression 41

Stepwise Regression Analysis n n Try to list all the variables that might affect a college freshman’s GPA: Grades in high school courses, high school GPA, SAT score, ACT score Major, number of units carried, number of courses taken Work schedule, marital status, commute or live on campus A stepwise regression analysis fits a variety of models to the data, adding and deleting variables as their significance in the presence of the other variables is either significant or nonsignificant, respectively. Once the program has performed a sufficient number of iterations and no more variables are significant when added to the model, and none of the variables are nonsignificant when removed, the procedure stops. These programs always fit first-order models and are not helpful in detecting curvature or interaction in the data. Multiple Regression 42

Selection of Variables in Multiple Regression n n All Possible Regressions n R 2 p or adj R 2 p n MSE(p) n Cp Stepwise Regression n Start with the variable with the highest correlation with Y. n Forward Selection n Backward Selection Multiple Regression pp. 539~549 43

Misinterpreting a Regression Analysis n n n A second-order model in the variables might provide a very good fit to the data when a first-order model appears to be completely useless in describing the response variable y. Causality Be careful not to deduce a causal relationship between a response y and a variable x. Multicollinearity Neither the size of a regression coefficient nor its t-value indicates the importance of the variable as a contributor of information. This may be because two or more of the predictor variables are highly correlated with one another; this is called multicollinearity. Multiple Regression 44

n Multicollinearity can have these effects on the analysis: The estimated regression coefficients will have large standard errors, causing imprecision in confidence and prediction intervals. Adding or deleting a predictor variable may cause significant changes in the values of the other regression coefficients. n How can you tell whether a regression analysis exhibits multicollinearity? The value of R 2 is large, indicating a good fit, but the individual t-tests are nonsignificant. The signs of the regression coefficients are contrary to what you would intuitively expect the contributions of those variables to be. A matrix of correlations, generated by the computer, shows Multiple Regression 45

The last three columns of the matrix show significant correlations between all but one pair of predictor variables: Multiple Regression 46

- Linear regression vs multiple regression
- Multiple linear regression
- Kr
- Linear trend equation
- Survival analysis vs logistic regression
- Logistic regression vs linear regression
- Linear regression with multiple features
- Multiple linear regression variance
- Multiple linear regression variance
- Multiple linear regression analysis formula
- Dataset for multiple regression
- Simple linear regression spss
- Regresscar
- 14
- Linear regression with multiple variables machine learning
- Log linear regression model
- Log linear regression model
- Assumptions of classical linear regression model
- Classical normal linear regression model
- Linear regression model validation techniques
- Linear regression function
- Linear regression
- Bivariate linear regression model
- Concentric zone theory
- Anova multiple regression
- Extra sum of squares multiple regression
- Multiple regression analysis with qualitative information
- Explanatory variable definition
- Multiple regression analysis adalah
- Quadratic regression spss
- Multiple nonlinear regression spss
- Karl wuensch
- Ln(p/1-p)
- Hierarchical multiple regression spss
- 2-5 scatter plots and lines of regression
- Direction of omitted variable bias
- Hypothesis for multiple regression
- Quantitative regression analysis
- Multiple regression analysis inference
- Multiple regression analysis inference
- Linear regression spss interpretation
- Hypothesis for multiple regression
- Moderated multiple regression
- Andy field regression
- Additive equation
- Contoh soal regresi berganda
- Stata 教學