Presentation is loading. Please wait.

Presentation is loading. Please wait.

Regression with 2 IVs Generalization of Regression from 1 to 2 Independent Variables.

Similar presentations


Presentation on theme: "Regression with 2 IVs Generalization of Regression from 1 to 2 Independent Variables."— Presentation transcript:

1 Regression with 2 IVs Generalization of Regression from 1 to 2 Independent Variables

2 Questions Write a raw score regression equation with 2 IVs in it. What is the difference in interpretation of b weights in simple regression vs. multiple regression? What happens to b weights if we add new variables to the regression equation that are highly correlated with ones already in the equation? Why do we report beta weights (standardized b weights)?

3 More Questions Write a regression equation with beta weights in it. How is it possible to have a significant r- square and non- significant b weights? What are the three factors that influence the standard error of the b weight? Describe R-square in two different ways, that is, using two distinct formulas. Explain the formulas.

4 Equations 1 IV. Define terms. Multiple IVs. One score, 1 intercept; 1 error; many slopes. Predicted value. Recall slope and intercept for 1 IV: Sum of cross-products.

5 Equations (2) Note: b weights use SSx1, SSx2, and all 3 cross products. Unlike slopes, the intercept is a simple extension of the 1 IV case.

6 Numerical Example Chevy mechanics; mechanical aptitude & conscientiousness. Find sums. Job PerfMech Apt Consc YX1X2X1*YX2*YX1*X2 1402540251000 245209040900 1383038301140 358381741142204 YX1X2X1*YX2*YX1*X2 6510386553513221934510Sum 20 N 3.2551.932.75175.65110.951725.5M 1.257.585.2484.3354.73474.60SD 29.751091.8521.75 USS Note. Only some of the data are shown. Size problem in Powerpoint.

7 SSCP Matrix SSCP means sums of squares and cross-products. YX1X2 Y29.75 X1139.51091.8 X290.25515.5521.75 YX1X2 Y X1 X2

8 Find Estimates YX1 (MA)X2 (Consc) Y (Perf)29.75 X1139.51091.8 X290.25515.5521.75 SSCP Predicted job performance as a function of test scores.

9 Scatterplots

10 Scatterplot 2

11 Scatterplot 3 Predicted Y is a plane.

12 R2R2 Y is linear function of Xs plus error. YX1X2Y'Resid 245201.540.46 138301.81-0.81 350302.840.16 248282.50-0.50 355303.28-0.28 353343.45-0.45 455363.800.20 458323.710.29 340342.330.67 555383.981.02 348282.500.50 345302.410.59 255363.80-1.80 460344.06-0.06 560384.410.59 560424.760.24 565384.840.16 450343.190.80 358384.24-1.24 M = 3.2551.932.753.250 V = 1.5757.4627.461.050.52 USS=29.83 19.959.42 Use capital R for multiple regression. R 2 is the proportion of variance in Y due to regression. Note: N=19; lost 1.

13 Correlations Among Data YX1X2PredResid Y1 X1.731 X2.68.641 Pred.78.94.871 Resid.620001

14 Excel Example Grab from the web under Lecture, Excel Example.

15 Review Write a raw score regression equation with 2 IVs in it. Describe terms. Describe a concrete example where you would use multiple regression to analyze the data. What does R 2 mean in multiple regression? For your concrete example, what would an R 2 of.15 mean? With 1 IV, the IV and the predicted values correlate 1.0. Not so with 2 or more IVs. Why?

16 Significance Test for R 2 When the null is true, result is distributed as F with k and (N-k-1) df. In our example, R 2 =.61, k = 2 and N = 20. F(α=.05,2,17)=3.59.

17 The Problem of Variable Importance With 1 IV, the correlation provides a simple index of the ‘importance’ of that variable. Both r and r 2 are good indices of importance with 1 IV. With multiple IVs, total R-square will be the sum of the individual IV r 2 values, if and only if the IVs are mutually uncorrelated, that is, they correlate to some degree with Y, but not with each other. When multiple IVs are correlated, there are many different statistical indices of the ‘importance’ of the IVs, and they do not agree with one another. There is no simple answer to questions about the importance of correlated IVs. Rather there are many reasonable answers depending on what you mean by importance.

18 Venn Diagrams {easy but not always right} Fig 1. IVs uncorrelated. Fig 2. IVs correlated. r 2 for X1, Y. RYX1X2 Y1 X1.401 X2.50.301 R 2 =.5 2 +.6 2 =.61 RYX1X2 Y1 X1.501 X2.60.001 R 2 =.32 R 2.16+.25 =.41 What to do with shared Y?

19 More Venn Diagrams Desired state Typical state In a regression problem, we want to predict Y from X as well as possible (maximize R 2 ). To do so, want X variables correlated with Y but not X. Hard to find, e.g., cognitive ability tests.

20 Raw & Standardized Regression Weights Each X has a raw score slope, b. Slope tells expected change in Y if X changes 1 unit*. Large b weights should indicate important variables, but b depends on variance of X. A b for height in inches would be 12 times larger than b for height in feet. If we standardize X and Y, all units of X are the same. Relative size of b now meaningful. *strictly speaking, holding other X variables constant.

21 Computing Standardized Regression Weights Standardized regression weight aka beta weight. Poor choice of names & symbols. With 1 IV,. If you have a correlation matrix, you can calculate beta weights (standardized regression weights). Yx1x2 Y1 x10.731 x20.680.641 What is r 12 ? What impact?

22 Calculating R 2 Sum of squared simple (zero order) r. Product of standardized regression weight and r. This is really interesting because the sum of products will add up to R 2 and because r,, and the product of the two are all reasonable indices of the importance of the IV.

23 Calculating R 2 (2) Yx1x2 Y1 x10.731 x20.680.641

24 Review What is the problem with correlated independent variables if we want to maximize variance accounted for in the criterion? Why do we report beta weights (standardized b weights)? Describe R-square in two different ways, that is, using two distinct formulas. Explain the formulas.

25 Tests of Regression Coefficients (b Weights) Each slope tells the expected change in Y when X changes 1 unit, but X is controlled for all other X variables. Consider Venn diagrams. Standard errors of b weights with 2 IVs: Where S 2 y.12 is the variance of estimate (variance of residuals), the first term in the denominator is the sum of squares for X 1 or X 2, and r 2 12 is the squared correlation between predictors.

26 Tests of b Weights (2) SSres=9.42 For significance of the b weight, compute a t: Degrees of freedom for each t are N-k-1.

27 Tests of R 2 vs Tests of b Slopes (b) tell about the relation between Y and the unique part of X. R 2 tells about proportion of variance in Y accounted for by set of predictors all together. Correlations among X variables increase the standard errors of b weights but not R 2. Possible to get significant R 2, but no or few significant b weights (see Venn diagrams). Possible but unlikely to have significant b but not significant R 2. Look to R 2 first. If it is n.s., avoid interpreting b weights.

28 Review How is it possible to have a significant R-square and non-significant b weights? Write a regression equation with beta weights in it. Describe terms.

29 Testing Incremental R 2 You can start regression with a set of one or more variables and then add predictors 1 or more at a time. When you add predictors, R 2 will never go down. It usually goes up, and you can test whether the increment in R 2 is significant or else if likely due to chance. =R-square for the larger model =R-square for the smaller model = number of predictors in the larger model =number of predictors in the smaller model

30 Examples of Testing Increments Suppose we start with 1 variable and R-square is.52. We add a second variable and R-square increases to.67. We have 20 people. Then p<.05 Suppose we start with 3 IVs and R-square is.25. We add 2 more IVs in a block and R-square climbs to.35. We have 100 people. Then: p <.05

31 Another Look at Importance In regression problems, the most commonly used indices of importance are the correlation, r, and the increment to R-square when the variable of interest is considered last. The second is sometimes called a last-in R-square change. The last-in increment corresponds to the Type III sums of squares and is closely related to the b weight. The correlation tells about the importance of the variable ignoring all other predictors. The last-in increment tells about the importance of the variable as a unique contributor to the prediction of Y, above and beyond all other predictors in the model. You can assign shared variance in Y to specific X by adding variable to equations in order, but then the importance is sort of arbitrary and under your influence. “Importance” is not well defined statistically when IVs are correlated. Doesn’t include mediated models (path analysis).

32 Review Find data on website – Labs, then 2IV example Find r, beta, r*beta Describe importance


Download ppt "Regression with 2 IVs Generalization of Regression from 1 to 2 Independent Variables."

Similar presentations


Ads by Google