Linear Regression and CorrelationLeast Squares Estimation of b0, b1Example - Pharmacodynamics of LSDLeast Squares ComputationsSlide 5SPSS Output and Plot of EquationInference Concerning the Slope (b1)Hypothesis Test for b1(1-a)100% Confidence Interval for b1Slide 10Correlation CoefficientSlide 12Slide 13Example - SPSS Output Pearson’s and Spearman’s MeasuresAnalysis of Variance in RegressionSlide 16Slide 17Slide 18Example - SPSS OutputMultiple RegressionExample - Effect of Birth weight on Body Size in Early AdolescenceLeast Squares EstimationAnalysis of VarianceTesting for the Overall Model - F-testSlide 25Testing Individual Partial Coefficients - t-testsSlide 27Models with Dummy VariablesExample - Deep Cervical InfectionsExample - Weather and Spinal PatientsAnalysis of CovarianceLinear Regression and Correlation•Explanatory and Response Variables are Numeric•Relationship between the mean of the response variable and the level of the explanatory variable assumed to be approximately linear (straight line)•Model:),0(~10NxY • 1 > 0 Positive Association• 1 < 0 Negative Association• 1 = 0 No AssociationLeast Squares Estimation of 0, 10 Mean response when x=0 (y-intercept)1 Change in mean response when x increases by 1 unit (slope)• 0, 1 are unknown parameters (like )• 0+1x Mean response when explanatory variable takes on the value x•Goal: Choose values (estimates) that minimize the sum of squared errors (SSE) of observed values to the straight-line: 211^0^12^1^0^^niiiniiixyyySSExyExample - Pharmacodynamics of LSDScore (y) LSD Conc (x)78.93 1.1758.20 2.9767.47 3.2637.47 4.6945.65 5.8332.92 6.0029.97 6.41• Response (y) - Math score (mean among 5 volunteers)• Predictor (x) - LSD tissue concentration (mean of 5 volunteers)• Raw Data and scatterplot of Score vs LSD concentration:LSD_CONC7654321SCORE80706050403020Source: Wagner, et al (1968)Least Squares Computations 222^21^0^21^22nSSEnyysxySSxxyyxxyySyyxxSxxSxxxyyyxyxxExample - Pharmacodynamics of LSD72.5001.910.8910.89)33.4)(01.9(09.5001.94749.224872.202333.4733.30087.50761.3502^1^0^1^sxyxyxyScore (y) LSD Conc (x) x-xbar y-ybar Sxx Sxy Syy78.93 1.17 -3.163 28.843 10.004569 -91.230409 831.91864958.20 2.97 -1.363 8.113 1.857769 -11.058019 65.82076967.47 3.26 -1.073 17.383 1.151329 -18.651959 302.16868937.47 4.69 0.357 -12.617 0.127449 -4.504269 159.18868945.65 5.83 1.497 -4.437 2.241009 -6.642189 19.68696932.92 6.00 1.667 -17.167 2.778889 -28.617389 294.70588929.97 6.41 2.077 -20.117 4.313929 -41.783009 404.693689350.61 30.33 -0.001 0.001 22.474943 -202.487243 2078.183343(Column totals given in bottom row of table)SPSS Output and Plot of EquationCoefficientsa89.124 7.048 12.646 .000-9.009 1.503 -.937 -5.994 .002(Constant)LSD_CONCModel1B Std. ErrorUnstandardizedCoefficientsBetaStandardizedCoefficientst Sig.Dependent Variable: SCOREa. Linear Regression1.00 2.00 3.00 4.00 5.00 6.00lsd_conc30.0040.0050.0060.0070.0080.00scorescore = 89.12 + -9.01 * lsd_concR-Square = 0.88Math Score vs LSD Concentration (SPSS)Inference Concerning the Slope (1)•Parameter: Slope in the population model (1)•Estimator: Least squares estimate:•Estimated standard error: •Methods of making inference regarding population:–Hypothesis tests (2-sided or 1-sided) –Confidence Intervals1^xxSs /^1^Hypothesis Test for 1•2-Sided Test–H0: 1 = 0–HA: 1 0•1-sided Test–H0: 1 = 0–HA+: 1 > 0 or–HA-: 1 < 0|)|(2:||:..:..2,2/^1^1^obsnobsobsttPvalPttRRtST)(:)(::..:..:..2,2,^1^1^obsobsnobsnobsobsttPvalPttPvalPttRRttRRtST(1-)100% Confidence Interval for 1xxSstt2/1^^2/1^1^• Conclude positive association if entire interval above 0• Conclude negative association if entire interval below 0• Cannot conclude an association if interval contains 0• Conclusion based on interval is same as 2-sided hypothesis testExample - Pharmacodynamics of LSD50.1475.2212.7475.2212.772.5001.971^^1^xxSsn• Testing H0: 1 = 0 vs HA: 1 0 571.2|:|..01.650.101.9:..5,025. ttRRtSTobsobs• 95% Confidence Interval for 1 :)15.5,87.12(86.301.9)50.1(571.201.9 Correlation Coefficient• Measures the strength of the linear association between two variables•Takes on the same sign as the slope estimate from the linear regression•Not effected by linear transformations of y or x•Does not distinguish between dependent and independent variable (e.g. height and weight)•Population Parameter - •Pearson’s Correlation Coefficient: 11 rSSSryyxxxyCorrelation Coefficient• Values close to 1 in absolute value strong linear association, positive or negative from sign• Values close to 0 imply little or no association• If data contain outliers (are non-normal), Spearman’s coefficient of correlation can be computed based on the ranks of the x and y values• Test of H0: = 0 is equivalent to test of H0:1=0• Coefficient of Determination (r2) - Proportion of variation in y “explained” by the regression on x:10)(222 rSSSESrryyyyExample - Pharmacodynamics of LSD22)94.0(88.0183.207889.253183.207894.0)183.2078)(475.22(487.20289.253183.2078487.202475.22rrSSESSSyyxyxxMean1.00 2.00 3.00 4.00 5.00 6.00lsd_conc30.0040.0050.0060.0070.0080.00Mean = 50.09Linear Regression1.00 2.00 3.00 4.00 5.00 6.00lsd_conc30.0040.0050.0060.0070.0080.00scorescore = 89.12 + -9.01 * lsd_concR-Square = 0.88Syy SSEExample - SPSS OutputPearson’s and Spearman’s MeasuresCorrelations1 -.937**. .0027 7-.937** 1.002 .7 7Pearson CorrelationSig. (2-tailed)NPearson CorrelationSig. (2-tailed)NSCORELSD_CONCSCORE LSD_CONCCorrelation is significant at the 0.01 level (2-tailed).**. Correlations1.000 -.929**. .0037 7-.929** 1.000.003 .7 7Correlation CoefficientSig. (2-tailed)NCorrelation CoefficientSig.
View Full Document