当前位置:文档之家› 第10章 一元回归及简单相关分析

第10章 一元回归及简单相关分析

第十章一元回归及简单相关分析10.1对尿毒症患者采用低蛋白并补加基本氨基酸的食物进行治疗,分析该疗法对患者体内一些成分的影响。

以下数据是在治疗前患者的基本数据[64]:体重(BW)/kg 体内总钾(TBK)/mmol血清尿素(UREA)/(mmol·L-1)73 3 147 1970 3 647 3672 3 266 2553 2 650 2597 3 738 3477 3 982 3663 2 900 4954 3 194 3866 3 930 1653 3 419 3470 3 978 3463 2 747 2665 4 181 4688 3 678 4182 3 540 3969 3 912 1991 4 138 3562 2 896 4374 3 410 5090 3 679 2374 3 855 3871 2 750 5059 3 583 3180 3 268 4766 2 846 45115 4 804 65111 5 290 3864 2 960 4571 3 610 2469 2 905 31计算三者之间的相关系数,并检验相关的显著性。

答:所用程序及计算结果如下:options linesize=76 nodate;data uremia;infile 'e:\data\er10-1e.dat';input bw tbk urea @@;run;proc corr nosimple;var bw tbk urea;run;The SAS SystemCorrelation Analysis3 'VAR' Variables: BW TBK UREAPearson Correlation Coefficients / Prob > |R| under Ho: Rho=0 / N = 30BW TBK UREA0.0 0.0001 0.1257TBK 0.70594 1.00000 0.09661 0.0001 0.0 0.6116UREA 0.28582 0.09661 1.00000 0.1257 0.6116 0.0三个变量间,只有体重(BW)和体内总钾(TBK)间相关显著,r =0.705 94。

相关系数的显著性概率P =0.000 1。

10.2 还是上例,经过一年的饮食治疗后,体内总钾量与治疗前的总钾量,如下表[64]:病人号治疗后 /mmol治疗前 /mmol16 3 246 3 147 22 3 272 3 647 25 3 110 3 266 28 2 006 2 650 392 8792 90047 3 620 3 930 51 3 597 3 978 53 3 080 2 747 56 3 420 3 678 382 2802 40054 2 360 2 105 582 490 2 530以治疗前为自变量,治疗后为因变量,计算回归方程,并检验回归的显著性。

答:计算结果如下:The SAS SystemThe REG Procedure Model: MODEL1Dependent Variable: afterAnalysis of VarianceSum of MeanSource DF Squares Square F Value Pr > FModel 1 2573589 2573589 39.40 <.0001 Error 10 653264 65326 Corrected Total 11 3226853Root MSE 255.59029 R-Square 0.7976 Dependent Mean 2946.66667 Adj R-Sq 0.7773 Coeff Var 8.67388Parameter EstimatesParameter StandardVariable DF Estimate Error t Value Pr > |t|Intercept 1 560.15163 387.31612 1.45 0.1787 before 1 0.77447 0.12339 6.28 <.0001回归方程为:X Y 47774.063151.560ˆ+=t 检验的显著性概率P <0.000 1。

故回归系数极显著。

10.3调查河流中悬浮物每月沉淀的量与水流速度的关系,得到以下结果[65]:流量/(m3·min-1)每月上层沉积物/t流量/(m3·min-1)每月主流沉积物/t流量/(m3·min-1)每月下层沉积物/t1 651.3 425 468 12 181.6 1 990 300 23 640.1 2 010 730848.6 209 455 9 902.3 1 626 786 11 269.9 671.326 832.6 183 412 3 592.4 488 599 3 405.2 148.755 621.4 147 799 3 325.3 471 549 1 398.6 39 156 598.6 108 025 1 763.8 112 404 1 144.6 24 843 574.3 200 537 1 429.7 89 201 1 126.4 32 939 228.4 50 386 1 404.4 79 615 675.4 9 913 204.8 57 608 1 337.6 84 191 285.6 1 189 188.1 30 947 1 128.6 62 034 174.0 26416.3 1 826 823.1 87 925 104.2 881655.9 52 395 97.4 259595.1 66 379 47.1 367569.1 29 913 45.9 70273.9 20 497 41.3 136265.8 22 469 32.6 70236.7 22 704 3.4 13236.2 27 566 1.2 4145.8 7 463142.7 11 28197.2 9 25770.0 3 69963.7 3 95532.8 2 63627.2 1 23218.0 1 06817.0 58415.6 40010.2 4567.9 1956.6 114以流量为自变量,月沉积物为因变量,计算回归方程。

答:首先对自变量和因变量做双对数变换,获得经对数变换后的回归方程,再通过反对数得到原始单位的回归方程。

程序和结果如下:options linesize=76 nodate;data river;infile 'E:\data\er10-3e.dat';input upflow upsedim midflow midsedim lowflow lowsedim @@;x1=log10(upflow); y1=log10(upsedim);x2=log10(midflow); y2=log10(midsedim);x3=log10(lowflow); y3=log10(lowsedim);proc reg;model y1=x1;proc reg;model y2=x2;proc reg;model y3=x3;run;(1)上层沉积物:The SAS SystemModel: MODEL1Source DF Squares Square F Value Prob>FModel 1 3.92128 3.92128 382.295 0.0001 Error 8 0.08206 0.01026 C Total 9 4.00334Root MSE 0.10128 R-square 0.9795 Dep Mean 4.89337 Adj R-sq 0.9769 C.V. 2.06970Parameter EstimatesParameter Standard T for H0:Variable DF Estimate Error Parameter=0 Prob > |T|INTERCEP 1 1.890841 0.15686760 12.054 0.0001X1 1 1.175010 0.06009554 19.552 0.0001从参数估计列,得到如下回归方程:变换为原单位后的方程为:010175.11118775.77ˆX Y =由t 检验的显著性概率可知,回归系数和常数项都是显著的。

(2)主流沉积物:The SAS SystemModel: MODEL1Dependent Variable: Y2Analysis of VarianceSum of MeanSource DF Squares Square F Value Prob>FModel 1 35.58584 35.58584 1438.727 0.0001 Error 28 0.69256 0.02473 C Total 29 36.27840Root MSE 0.15727 R-square 0.9809 Dep Mean 4.19618 Adj R-sq 0.9802 C.V. 3.74797Parameter EstimatesParameter Standard T for H0:Variable DF Estimate Error Parameter=0 Prob > |T|INTERCEP 1 1.366966 0.07992510 17.103 0.0001X2 1 1.194288 0.03148616 37.931 0.0001从参数估计列得到回归方程如下:22288194.1966366.1ˆX Y '+='变换为原单位后的方程为:288194.122090279.23ˆX Y =由t 检验的显著性概率可知,回归系数和常数项都是显著的。

(3)底层沉积物:The SAS SystemModel: MODEL111010175.1841890.1ˆX Y '+='Source DF Squares Square F Value Prob>FModel 1 20.99588 20.99588 26.414 0.0001 Error 15 11.92328 0.79489 C Total 16 32.91916Root MSE 0.89156 R-square 0.6378 Dep Mean 2.92730 Adj R-sq 0.6137 C.V. 30.45683Parameter EstimatesParameter Standard T for H0:Variable DF Estimate Error Parameter=0 Prob > |T|INTERCEP 1 0.593156 0.50301446 1.179 0.2567 X3 1 0.996479 0.19388907 5.139 0.0001从参数估计列得到回归方程如下:33479996.0156593.0ˆX Y '+='变换为原单位后的方程为:479996.033826918.3ˆX Y =由t 检验的显著性概率可知,回归系数是显著的。

相关主题