Chapter 11 Student Lecture Notes 11-1 Lnear regresson Wenl lu Dept. Health statstcs School of publc health Tanjn medcal unversty 1 Regresson Models 1. Answer What Is the Relatonshp Between the Varables?. Equaton Used 1 Numercal Dependent (Response) Varable What Is to Be Predcted 1 or More Numercal or Categorcal Independent (Explanatory) Varables 3. Used Manly for Predcton & Estmaton Regresson Analyss s the estmaton of the lnear or nonlnear relatonshp between a dependent varable and one or more ndependent varables or covarates. (from SPSS Help) 3
Chapter 11 Student Lecture Notes 11- Types of Regresson Models 1 Explanatory Varable Regresson Models + Explanatory Varables Smple Multple Lnear Non- Lnear Lnear Non- Lnear 4 Thnkng Challenge: Whch Is More Logcal? Sales Advertsng Sales Advertsng 5 Types of Regresson Models 1 Explanatory Regresson + Explanatory Varable Models Varables Smple Multple Lnear Lnear Non- Lnear Non- Lnear 6
Chapter 11 Student Lecture Notes 11-3 Regresson Modelng Steps 1. Hypothesze Determnstc Component. Estmate Unknown Model Parameters 7 Lnear Equatons = m + b m = Slope Change n b = -ntercept Change n Hgh School Teacher 1984-1994 T/Maker Co. 8 Populaton Lnear Regresson Model 0 1 = Random error Observed value Observed value E 0 1 9
Chapter 11 Student Lecture Notes 11-4 Lnear Regresson Model Relatonshp Between Varables Is a Lnear Functon Populaton -Intercept Populaton Slope Random Error 0 1 Dependent (Response) Varable (e.g., ncome) Independent (Explanatory) Varable (e.g., educaton) Populaton & Sample Regresson Models Populaton Unknown Relatonshp $ 0 1 $ $ $ $ Random Sample 0 1 $ $ 11 Sample Lnear Regresson Model Observed value 0 1 ^ = Random error 0 1 Unsampled observaton 1
Chapter 11 Student Lecture Notes 11-5 Estmatng Parameters: Least Squares Method 13 Scattergram Plot of All ((, ) Pars 60 40 0 0 0 0 40 60 14 Thnkng Challenge How would you draw a lne through the ponts? How do you determne whch lne fts best? 100 50 0 0 0 40 60 15
Chapter 11 Student Lecture Notes 11-6 Least Squares 1. Best Ft Means Dfference Between Actual Values & Predcted Values Are a Mnmum But Postve Dfferences Off-Set Negatve n 1 n ˆ ˆ 1 16 Least Squares Graphcally LS mnmzes n ˆ ˆ ˆ ˆ 1 3 ˆ 4 1 ^ ^ 1 ^ 3 0 1 ^ 4 0 1 17 Coeffcent Equatons Predcton Equaton yˆ ˆ ˆ 0 1x Sample Slope ˆ 1 SS SS xy xx Sample -ntercept ˆ 0 y ˆ 1x x x y y lxy x x lxx 18
Chapter 11 Student Lecture Notes 11-7 Interpretaton of Coeffcents ^ 1. Slope ( ( 1 ) Estmated Changes by ^ 1 for Each 1 Unt Increase n ^ If 1 =, then Sales ()( ) Is Expected to Increase by for Each 1 Unt Increase n Advertsng ()( ^. -Intercept ( ( 0 ) Average Value of When = 0 19 Table 1 Smple lnear regresson Age and systolc blood pressure (SBP) among 33 adult women Age SBP Age SBP Age SBP 131 41 139 5 18 3 18 41 171 54 105 4 116 46 137 56 145 7 106 47 111 57 141 8 114 48 115 58 153 9 13 49 133 59 157 30 117 49 18 63 155 3 1 50 183 67 176 33 99 51 130 71 17 35 11 51 133 77 178 40 147 51 144 81 17 0 SBP (mm Hg) 0 00 SBP 81.51. Age 180 160 140 10 100 80 0 30 40 50 60 70 80 90 Age (years) adapted from Colton T. Statstcs n Medcne. Boston: Lttle Brown, 1974 1
Chapter 11 Student Lecture Notes 11-8 It s tme-consumng to calculate t by calculator How to do t wth software-spss Regresson ->lnear 3 The value of the dependent varable therefore depends upon the value of the ndependent varable 4
Chapter 11 Student Lecture Notes 11-9 5 ˆ ˆ 1 0 1 SBP 81.5 1. Age 6 Regresson Modelng Steps 1. Hypothesze Determnstc Component. Estmate Unknown Model Parameters 3. Specfy Probablty Dstrbuton of Random Error Term Estmate Standard Devaton of Error 4. Evaluate Model 5. Use Model for Predcton & Estmaton 7
Chapter 11 Student Lecture Notes 11-10 Test of Slope Coeffcent 1. Shows If There Is a Lnear Relatonshp Between &. Involves Populaton Slope 1 3. Hypotheses H 0 : 1 = 0 (No Lnear Relatonshp) H a : 1 0 (Lnear Relatonshp) 4. Theoretcal Bass Is Samplng Dstrbuton of Slope 8 SBP 81.5 1. Age There s a sgnfcant assocaton between age and sbp (p=0.000). 9 Hypothess test 30
Chapter 11 Student Lecture Notes 11-11 Coeffcent of determnaton 31 Be cautous for both correlaton and regresson Correlaton does not mean causalty Patents heght may correlate wth ther blood pressure, but t does not mean that ther heght s the cause for ther blood pressure 3 Be cautous When the estmaton s based on sample data, you may get a strong postve or negatve correlaton purely by chance, even though there s no relatonshp between the two varables Patents shoe sze n the hosptal may correlates wth ther blood pressure at tme of admsson, but there may be no relatonshp between the two 33
Chapter 11 Student Lecture Notes 11-1 ou can do t,i have fath on you! Multvarate lnear regresson more ndependent varable Non-lnear regresson Logstc regresson when the dependent varable s a 0-10 1 varable 34