文档详情

《第8章直线回归与相关》-课件.ppt

发布:2018-11-07约1.43万字共60页下载文档
文本预览下载声明
偏微分符号,有人把它读作partial或d,都是不正规的,正确的读法应该是round,这个符号是法国人发明的,一开始就读round 倒三角符号,读作nabla或del。读nabla的居多,后者在某些英文里会见到 * fraction sweet 1 15 3 18 4 19 5.5 21 7 22.6 8 23.8 9.5 26 p61-read.table(clipboard,header=T) p61 fraction sweet 1 1.0 15.0 2 3.0 18.0 3 4.0 19.0 4 5.5 21.0 5 7.0 22.6 6 8.0 23.8 7 9.5 26.0 mylm-lm(sweet~fraction,data=p61) mylm Call: lm(formula = sweet ~ fraction, data = p61) Coefficients: (Intercept) fraction 13.958 1.255 summary(mylm) Call: lm(formula = sweet ~ fraction, data = p61) Residuals: 1 2 3 4 5 6 7 -0.21342 0.27651 0.02148 0.13893 -0.14362 -0.19866 0.11879 Coefficients: Estimate Std. Error t value Pr(|t|) (Intercept) 13.95839 0.17347 80.47 5.62e-09 *** fraction 1.25503 0.02849 44.05 1.14e-07 *** --- Signif. codes: 0 *** 0.001 ** 0.01 * 0.05 . 0.1 1 Residual standard error: 0.2078 on 5 degrees of freedom Multiple R-squared: 0.9974, Adjusted R-squared: 0.9969 F-statistic: 1940 on 1 and 5 DF, p-value: 1.138e-07 p62-read.table(clipboard,header=T) Attach(p62) Cor(p62) cor(p62) x y x 1.0000000 -0.8517378 y -0.8517378 1.0000000 Cor.test(x,y) p62 x y 1 15.4 44.0 2 17.5 38.2 3 18.9 41.8 4 20.0 38.9 5 21.0 38.4 6 22.8 38.1 7 15.8 44.6 8 17.8 40.7 9 19.1 39.8 10 20.4 40.0 11 21.5 37.8 12 22.9 34.7 13 15.9 42.6 14 17.9 39.8 15 19.4 42.0 16 20.4 37.4 17 21.6 35.9 18 22.9 36.0 19 16.1 42.1 20 18.1 40.0 21 19.6 40.2 22 20.4 39.1 23 21.8 39.4 24 23.4 33.2 25 16.8 43.1 26 18.4 40.9 27 19.7 38.9 28 20.7 35.8 29 21.9 37.2 30 23.8 36.6 31 17.0 42.8 32 18.6 42.1 33 19.7 37.9 34 20.7 36.2 35 22.0 36.7 36 24.2 37.6 37 17.4 42.2 38 18.9 39.9 39 20.8 37.1 40 22.3 38.6 41 24.6 34.8 42 19.9 39.8 attach(p62) ssx-sum(x*x)-(sum(x))^2/length(x) ssx [1] 237.8048 ssy-sum(y*y)-(sum(y))^2/length(y) ssy [1] 292.6583 spxy-sum(x*y)-sum(x)*sum(y)/length(x) spxy [1]
显示全部
相似文档