相关与回归分析 sas课件.pptVIP

  • 13
  • 0
  • 约4千字
  • 约 29页
  • 2018-01-30 发布于浙江
  • 举报
相关与回归分析 sas课件

* * 相关与回归分析 * * 相关与回归分析 双变量相关分析 简单线性回归 * * 第一节 双变量相关分析 一、Pearson相关分析 二、Spearman等级相关 * * 例1 表1为一项关于儿童健康和发展的研究中10名学龄儿童的身高和体重资料。 表1 10名学龄儿童的身高和体重 一、Pearson相关分析 * * 建立数据文件 libname c E:\; data c.t1; input x y@@; datalines; 149.4 30.8 167.6 42.6 146.3 33.1 170.7 44.0 161.5 36.3 164.6 40.8 155.5 32.7 158.5 35.4 149.4 33.1 152.4 31.8 ; * * 绘制散点图 AXIS1 label=( h=0.25in f=zapfbi j=r HEIGHT(cm)) offset=(0.2 in ) order=(145 to 175 by 10); AXIS2 label=( a=90 h=0.25in f=zapfbi j=r WEIGHT(Kg)) order=(30 to 45 by 5) offset=(0.2 in ) ; proc gplot data=c.t1 ; plot y*x/HAXIS=AXIS1 VAXIS=AXIS2 noframe; symbol h=0.25in c=black; run; * * * * 绘制分层的散点图 goptions htext=0.25in ctext=black; AXIS1 label=( h=0.25in f=zapfbi j=r HEIGHT(cm)) offset=(0.2 in ) order=(145 to 175 by 10); AXIS2 label=( a=90 h=0.25in f=zapfbi j=r WEIGHT(Kg)) order=(30 to 45 by 5) offset=(0.2 in ) ; proc gplot data=c.t2 ; plot y*x=G/HAXIS=AXIS1 VAXIS=AXIS2 noframe; symbol1 h=0.25in c=black v=plus; symbol2 h=0.25in c=red v=plus; run; * * * * Pearson相关系数及其置信区间的计算 ods HTML FILE=E:\RESULT.xls ; proc corr data=c.t1 fisher; var x y; run; ODS HTML CLOSE; * * Pearson相关系数及其置信区间的计算 ods HTML FILE=E:\RESULT.xls ; proc corr data=c.t1 fisher; var x y; run; ODS HTML CLOSE; Pearson Correlation Statistics (Fishers z Transformation) Variable With Variable N Sample Correlation Fishers z Bias Adjustment Correlation Estimate 95%?Confidence?Limits p Value for H0:Rho=0 x y 10 0.93004 1.65871 0.05167 0.92272 0.699461 0.981896 .0001 * * * * 练习1 某医生测得10名正常成年男性的血浆清蛋白含量(g/L)及血红蛋白含量(g/L)数据如下,试问两者有无相关关系? * * 例2 某研究者研究10例6个月~7岁的贫血患儿的血红蛋白含量与贫血体征之间的相关性,结果见表3,请问贫血患儿的血红蛋白含量与贫血体征之间是否相关? 二、Spearman等级相关 * * 建立数据文件: data c.t3; label x=血红蛋白含量 y=贫血体征; input x y @@; cards; 5.0 4 5.8 3 6.1 2 7.3 1 8.8 3 9.1 3 11.1 1 12.3 1 13.5 1 13.8 1 ; * * Spearman相关系数的计算 ods HTML FILE=E:\RESULT2.xls ; proc corr data=c.t3 spearman; var x y; run; ODS HTML CLOSE; * * Spearman Correlation Co

文档评论(0)

1亿VIP精品文档

相关文档