unit 7 multiple linear regression lecture 1 introduction
play

Unit 7: Multiple Linear Regression Lecture 1: Introduction to MLR - PowerPoint PPT Presentation

Unit 7: Multiple Linear Regression Lecture 1: Introduction to MLR Statistics 101 Thomas Leininger June 20, 2013 Many variables in a model Many variables in a model 1 Adjusted R 2 2 Collinearity and parsimony 3 Inference for the model as a


  1. Unit 7: Multiple Linear Regression Lecture 1: Introduction to MLR Statistics 101 Thomas Leininger June 20, 2013

  2. Many variables in a model Many variables in a model 1 Adjusted R 2 2 Collinearity and parsimony 3 Inference for the model as a whole Inference for the slope(s) Statistics 101 U7 - L1: Multiple Linear Regression Thomas Leininger

  3. Many variables in a model Weights of books volume (cm 3 ) weight (g) cover 1 800 885 hc 2 950 1016 hc 3 1050 1125 hc 4 350 239 hc 5 750 701 hc 6 600 641 hc l 7 1075 1228 hc 8 250 412 pb 9 700 953 pb h 10 650 929 pb w 11 975 1492 pb 12 350 419 pb 13 950 1010 pb 14 425 595 pb 15 725 1034 pb Statistics 101 (Thomas Leininger) U7 - L1: Multiple Linear Regression June 20, 2013 2 / 17

  4. Many variables in a model Weights of hard cover and paperback books Can you identify a trend in the relationship between volume and weight of hardcover and paperback books? hardcover 1000 paperback 800 weight (g) 600 400 200 400 600 800 1000 1200 1400 volume ( cm 3 ) Statistics 101 (Thomas Leininger) U7 - L1: Multiple Linear Regression June 20, 2013 3 / 17

  5. Many variables in a model Weights of hard cover and paperback books Can you identify a trend in the relationship between volume and weight of hardcover and paperback books? Paperbacks generally weigh less than hardcover books. hardcover 1000 paperback 800 weight (g) 600 400 200 400 600 800 1000 1200 1400 volume ( cm 3 ) Statistics 101 (Thomas Leininger) U7 - L1: Multiple Linear Regression June 20, 2013 3 / 17

  6. Many variables in a model Modeling weights of books using volume and cover type book_mlr = lm(weight ˜ volume + cover, data = allbacks) summary(book_mlr) Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 197.96284 59.19274 3.344 0.005841 ** volume 0.71795 0.06153 11.669 6.6e-08 *** cover:pb -184.04727 40.49420 -4.545 0.000672 *** Residual standard error: 78.2 on 12 degrees of freedom Multiple R-squared: 0.9275, Adjusted R-squared: 0.9154 F-statistic: 76.73 on 2 and 12 DF, p-value: 1.455e-07 Statistics 101 (Thomas Leininger) U7 - L1: Multiple Linear Regression June 20, 2013 4 / 17

  7. Many variables in a model Modeling weights of books using volume and cover type book_mlr = lm(weight ˜ volume + cover, data = allbacks) summary(book_mlr) Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 197.96284 59.19274 3.344 0.005841 ** volume 0.71795 0.06153 11.669 6.6e-08 *** cover:pb -184.04727 40.49420 -4.545 0.000672 *** Residual standard error: 78.2 on 12 degrees of freedom Multiple R-squared: 0.9275, Adjusted R-squared: 0.9154 F-statistic: 76.73 on 2 and 12 DF, p-value: 1.455e-07 Conditions for MLR? Statistics 101 (Thomas Leininger) U7 - L1: Multiple Linear Regression June 20, 2013 4 / 17

  8. Many variables in a model Modeling weights of books using volume and cover type book_mlr = lm(weight ˜ volume + cover, data = allbacks) summary(book_mlr) Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 197.96284 59.19274 3.344 0.005841 ** volume 0.71795 0.06153 11.669 6.6e-08 *** cover:pb -184.04727 40.49420 -4.545 0.000672 *** Residual standard error: 78.2 on 12 degrees of freedom Multiple R-squared: 0.9275, Adjusted R-squared: 0.9154 F-statistic: 76.73 on 2 and 12 DF, p-value: 1.455e-07 Conditions for MLR? Same as for SLR, except now the response should have a linear relationship with each explanatory variable. Statistics 101 (Thomas Leininger) U7 - L1: Multiple Linear Regression June 20, 2013 4 / 17

  9. Many variables in a model Linear model Estimate Std. Error t value Pr( > | t | ) (Intercept) 197.96 59.19 3.34 0.01 volume 0.72 0.06 11.67 0.00 cover:pb -184.05 40.49 -4.55 0.00 Statistics 101 (Thomas Leininger) U7 - L1: Multiple Linear Regression June 20, 2013 5 / 17

  10. Many variables in a model Linear model Estimate Std. Error t value Pr( > | t | ) (Intercept) 197.96 59.19 3.34 0.01 volume 0.72 0.06 11.67 0.00 cover:pb -184.05 40.49 -4.55 0.00 � weight = 197 . 96 + 0 . 72 volume − 184 . 05 cover : pb Statistics 101 (Thomas Leininger) U7 - L1: Multiple Linear Regression June 20, 2013 5 / 17

  11. Many variables in a model Linear model Estimate Std. Error t value Pr( > | t | ) (Intercept) 197.96 59.19 3.34 0.01 volume 0.72 0.06 11.67 0.00 cover:pb -184.05 40.49 -4.55 0.00 � weight = 197 . 96 + 0 . 72 volume − 184 . 05 cover : pb For hardcover books: plug in 0 for cover 1 � weight 197 . 96 + 0 . 72 volume − 184 . 05 × 0 = Statistics 101 (Thomas Leininger) U7 - L1: Multiple Linear Regression June 20, 2013 5 / 17

  12. Many variables in a model Linear model Estimate Std. Error t value Pr( > | t | ) (Intercept) 197.96 59.19 3.34 0.01 volume 0.72 0.06 11.67 0.00 cover:pb -184.05 40.49 -4.55 0.00 � weight = 197 . 96 + 0 . 72 volume − 184 . 05 cover : pb For hardcover books: plug in 0 for cover 1 � weight 197 . 96 + 0 . 72 volume − 184 . 05 × 0 = 197 . 96 + 0 . 72 volume = Statistics 101 (Thomas Leininger) U7 - L1: Multiple Linear Regression June 20, 2013 5 / 17

  13. Many variables in a model Linear model Estimate Std. Error t value Pr( > | t | ) (Intercept) 197.96 59.19 3.34 0.01 volume 0.72 0.06 11.67 0.00 cover:pb -184.05 40.49 -4.55 0.00 � weight = 197 . 96 + 0 . 72 volume − 184 . 05 cover : pb For hardcover books: plug in 0 for cover 1 � weight 197 . 96 + 0 . 72 volume − 184 . 05 × 0 = 197 . 96 + 0 . 72 volume = For paperback books: plug in 1 for cover 2 � weight 197 . 96 + 0 . 72 volume − 184 . 05 × 1 = Statistics 101 (Thomas Leininger) U7 - L1: Multiple Linear Regression June 20, 2013 5 / 17

  14. Many variables in a model Linear model Estimate Std. Error t value Pr( > | t | ) (Intercept) 197.96 59.19 3.34 0.01 volume 0.72 0.06 11.67 0.00 cover:pb -184.05 40.49 -4.55 0.00 � weight = 197 . 96 + 0 . 72 volume − 184 . 05 cover : pb For hardcover books: plug in 0 for cover 1 � weight 197 . 96 + 0 . 72 volume − 184 . 05 × 0 = 197 . 96 + 0 . 72 volume = For paperback books: plug in 1 for cover 2 � weight 197 . 96 + 0 . 72 volume − 184 . 05 × 1 = 13 . 91 + 0 . 72 volume = Statistics 101 (Thomas Leininger) U7 - L1: Multiple Linear Regression June 20, 2013 5 / 17

  15. Many variables in a model Visualising the linear model hardcover 1000 paperback 800 weight (g) 600 400 200 400 600 800 1000 1200 1400 volume ( cm 3 ) Statistics 101 (Thomas Leininger) U7 - L1: Multiple Linear Regression June 20, 2013 6 / 17

  16. Many variables in a model Interpretation of the regression coefficients Estimate Std. Error t value Pr( > | t | ) (Intercept) 197.96 59.19 3.34 0.01 volume 0.72 0.06 11.67 0.00 cover:pb -184.05 40.49 -4.55 0.00 Statistics 101 (Thomas Leininger) U7 - L1: Multiple Linear Regression June 20, 2013 7 / 17

  17. Many variables in a model Interpretation of the regression coefficients Estimate Std. Error t value Pr( > | t | ) (Intercept) 197.96 59.19 3.34 0.01 volume 0.72 0.06 11.67 0.00 cover:pb -184.05 40.49 -4.55 0.00 Slope of volume: All else held constant, for each 1 cm 3 increase in volume we would expect weight to increase on average by 0.72 grams. Statistics 101 (Thomas Leininger) U7 - L1: Multiple Linear Regression June 20, 2013 7 / 17

  18. Many variables in a model Interpretation of the regression coefficients Estimate Std. Error t value Pr( > | t | ) (Intercept) 197.96 59.19 3.34 0.01 volume 0.72 0.06 11.67 0.00 cover:pb -184.05 40.49 -4.55 0.00 Slope of volume: All else held constant, for each 1 cm 3 increase in volume we would expect weight to increase on average by 0.72 grams. Slope of cover: All else held constant, the model predicts that paperback books weigh 184.05 grams lower than hardcover books, on average. Statistics 101 (Thomas Leininger) U7 - L1: Multiple Linear Regression June 20, 2013 7 / 17

  19. Many variables in a model Interpretation of the regression coefficients Estimate Std. Error t value Pr( > | t | ) (Intercept) 197.96 59.19 3.34 0.01 volume 0.72 0.06 11.67 0.00 cover:pb -184.05 40.49 -4.55 0.00 Slope of volume: All else held constant, for each 1 cm 3 increase in volume we would expect weight to increase on average by 0.72 grams. Slope of cover: All else held constant, the model predicts that paperback books weigh 184.05 grams lower than hardcover books, on average. Intercept: Hardcover books with no volume are expected on average to weigh about 198 grams. Statistics 101 (Thomas Leininger) U7 - L1: Multiple Linear Regression June 20, 2013 7 / 17

  20. Many variables in a model Interpretation of the regression coefficients Estimate Std. Error t value Pr( > | t | ) (Intercept) 197.96 59.19 3.34 0.01 volume 0.72 0.06 11.67 0.00 cover:pb -184.05 40.49 -4.55 0.00 Slope of volume: All else held constant, for each 1 cm 3 increase in volume we would expect weight to increase on average by 0.72 grams. Slope of cover: All else held constant, the model predicts that paperback books weigh 184.05 grams lower than hardcover books, on average. Intercept: Hardcover books with no volume are expected on average to weigh about 198 grams. Obviously, the intercept does not make sense in context. It only serves to adjust the height of the line. Statistics 101 (Thomas Leininger) U7 - L1: Multiple Linear Regression June 20, 2013 7 / 17

Recommend


More recommend