![统计软件SAS简介及程序示例_第1页](http://file3.renrendoc.com/fileroot_temp3/2021-12/14/e57149f1-1742-4842-9b9f-03b02d338d55/e57149f1-1742-4842-9b9f-03b02d338d551.gif)
![统计软件SAS简介及程序示例_第2页](http://file3.renrendoc.com/fileroot_temp3/2021-12/14/e57149f1-1742-4842-9b9f-03b02d338d55/e57149f1-1742-4842-9b9f-03b02d338d552.gif)
![统计软件SAS简介及程序示例_第3页](http://file3.renrendoc.com/fileroot_temp3/2021-12/14/e57149f1-1742-4842-9b9f-03b02d338d55/e57149f1-1742-4842-9b9f-03b02d338d553.gif)
![统计软件SAS简介及程序示例_第4页](http://file3.renrendoc.com/fileroot_temp3/2021-12/14/e57149f1-1742-4842-9b9f-03b02d338d55/e57149f1-1742-4842-9b9f-03b02d338d554.gif)
![统计软件SAS简介及程序示例_第5页](http://file3.renrendoc.com/fileroot_temp3/2021-12/14/e57149f1-1742-4842-9b9f-03b02d338d55/e57149f1-1742-4842-9b9f-03b02d338d555.gif)
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、精选课件统计软件SAS简介及程序范例1. SAS简介简介2. 试验统计方法教材例题的试验统计方法教材例题的SAS程程序及运行结果序及运行结果精选课件1. SAS简介 SAS (Statistical Analysis System,统计分析系统统计分析系统)是当今国际上著名的数据分析软件系统是当今国际上著名的数据分析软件系统,其基本部其基本部分是分是SAS/BASE软件。软件。20世纪世纪60年代末期,由美国年代末期,由美国北卡罗纳州州立大学北卡罗纳州州立大学(North Carolina State University)的的A. J. Barr和和J. H. Goodnight两位教授两位
2、教授开始开发,开始开发,1975年创建了美国年创建了美国SAS研究所研究所(SAS Institute Inc.)。之后,推出的之后,推出的SAS系统,始终以领系统,始终以领先的技术和可靠的支持著称于世,通过不断发展先的技术和可靠的支持著称于世,通过不断发展和完善,目前已成为大型集成应用软件系统。和完善,目前已成为大型集成应用软件系统。精选课件 SAS系统具有统计分析方法丰富、信系统具有统计分析方法丰富、信息储存简单、语言编程能力强、能对数据息储存简单、语言编程能力强、能对数据连续处理、使用简单等特点。连续处理、使用简单等特点。SAS是一个是一个出色的统计分析系统,它汇集了大量的统出色的统计分
3、析系统,它汇集了大量的统计分析方法,从简单的描述统计到复杂的计分析方法,从简单的描述统计到复杂的多变量分析,编制了大量的使用简便的统多变量分析,编制了大量的使用简便的统计分析过程。计分析过程。精选课件SAS系统运行的几个重要前提条件 (一)(一)SAS系统运行时要同时打开的文件较多,系统运行时要同时打开的文件较多,因此在微型计算机的系统配置文件因此在微型计算机的系统配置文件CONFIG.SYS中应指定中应指定FILES=50或以上;或以上; (二)(二)SAS系统软件有时间租期限制,因此只系统软件有时间租期限制,因此只有机器时间(有机器时间(DATE)在软件有效期内才能运行。在软件有效期内才能
4、运行。时间租期取决于时间租期取决于SAS出售版本日期,即所谓的出售版本日期,即所谓的SAS诞生日(诞生日(BIRTHDAY)。)。 (三)三)SAS系统应全部安装到硬盘的系统应全部安装到硬盘的SAS子目子目录下,硬盘应至少有录下,硬盘应至少有10M空间。空间。 精选课件SAS for Windows的启动与退出 (一)启动(一)启动 SAS for Windows的启动,按的启动,按如下步骤进行。开机后,直接用鼠标双击桌如下步骤进行。开机后,直接用鼠标双击桌面上面上SAS系统的快捷键图标,自动显示系统的快捷键图标,自动显示主画主画面面,即可进入,即可进入SAS系统。系统。精选课件 (二二)退出
5、退出 当用完当用完SAS for Windows,需需要退出时,可以单击【要退出时,可以单击【File】,】,选择选择【Exit】,】,或者,单击或者,单击(关闭关闭)按钮,立即按钮,立即显示显示。 如果确认需要退出如果确认需要退出SAS for Windows,单击确定按钮;如果需要继续使用单击确定按钮;如果需要继续使用SAS for Windows,单击取消按钮。单击取消按钮。 精选课件2. 试验统计方法教材例题的SAS程序及运行结果 t测验测验 方差分析方差分析 直线回归分析直线回归分析 协方差分析协方差分析精选课件t检验 样本平均数与总体平均数的差异显著性检验样本平均数与总体平均数的差
6、异显著性检验 配对试验资料的配对试验资料的t t检验检验 非配对试验资料的非配对试验资料的t t检验检验精选课件样本平均数与总体平均数的差异显著性检验样本平均数与总体平均数的差异显著性检验( (例例4.3)4.3)data testt1;input x;differ=x-27.5;cards;32.5 28.6 28.4 24.7 29.1 27.2 29.8 33.3 29.7;proc means n mean stderr t prt;run;精选课件运行结果 The MEANS ProcedureVariable N Mean Std Error t Value Pr |t| x 9
7、29.2555556 0.8623468 33.93 |t| 675.4666667 391.5253952 1.73 0.1451精选课件非配对试验资料的非配对试验资料的t t检验检验( (例例4.54.5) )data testt3;input variety x;cards;1 18.68 1 20.67 1 18.42 1 18.00 1 17.44 1 15.952 18.68 2 23.22 2 21.42 2 19.00 2 18.92;proc ttest;class variety;var x;run;精选课件运行结果The TTEST ProcedureT-Tests Va
8、riable Method Variances DF t Value Pr |t| x Pooled Equal 9 -1.92 0.0868 x Satterthwaite Unequal 7.51 -1.87 0.1001 Equality of Variances Variable Method Num DF Den DF F Value Pr F x Folded F 4 5 1.66 0.5880精选课件方差分析方差分析 单因素完全随机化试验重复数相等资料单因素完全随机化试验重复数相等资料 单因素完全随机化试验重复数不等资料单因素完全随机化试验重复数不等资料 两因素交叉分组试验单独观
9、测值资料两因素交叉分组试验单独观测值资料 两因素交叉分组试验有重复观测值资料两因素交叉分组试验有重复观测值资料 次级样本含量相等的二因素系统分组资料次级样本含量相等的二因素系统分组资料 单因素随机区组设计试验资料单因素随机区组设计试验资料 拉丁方设计试验结果拉丁方设计试验结果 两因素随机区组设计试验资料两因素随机区组设计试验资料 两因素裂区设计试验资料两因素裂区设计试验资料 精选课件单因素完全随机化试验重复数相等资料单因素完全随机化试验重复数相等资料的方差分析(教材【例的方差分析(教材【例5.3】)】) data anova1;input variety x;cards;1 12 1 10 1
10、 14 1 16 1 12 1 182 8 2 10 2 12 2 14 2 12 2 163 14 3 16 3 13 3 16 3 10 3 154 16 4 18 4 20 4 16 4 14 4 16;proc anova;class variety;model x=variety;means variety/duncan;run;精选课件运行结果运行结果 The ANOVA Procedure Class Level Information Class Levels Values variety 4 1 2 3 4 Number of observations 24精选课件 The
11、ANOVA ProcedureDependent Variable: x Sum of Source DF Squares Mean Square F Value Pr F Model 3 67.1666667 22.3888889 3.43 0.0369 Error 20 130.6666667 6.5333333 Corrected Total 23 197.8333333 R-Square Coeff Var Root MSE x Mean 0.339511 18.14939 2.556039 14.08333Source DF Anova SS Mean Square F Value
12、Pr Fvariety 3 67.16666667 22.38888889 3.43 0.0369精选课件 The ANOVA Procedure Duncans Multiple Range Test for x NOTE: This test controls the Type I comparisonwise error rate, not the experimentwise error rate. Alpha 0.05 Error Degrees of Freedom 20 Error Mean Square 6.533333 Number of Means 2 3 4 Critic
13、al Range 3.078 3.231 3.328 精选课件Means with the same letter are not significantly different. Duncan Grouping Mean N variety A 16.667 6 4 A B A 14.000 6 3 B A B A 13.667 6 1 B B 12.000 6 2精选课件单因素完全随机化试验重复数不等资料单因素完全随机化试验重复数不等资料的方差分析(教材【例的方差分析(教材【例5.4】)】) data anova2;input variety x;cards;1 21.5 1 19.5 1
14、 20.0 1 22.0 1 18.0 1 20.02 16.0 2 18.5 2 17.0 2 15.5 2 20.0 2 16.03 19.0 3 17.5 3 20.0 3 18.0 3 17.04 21.0 4 18.5 4 19.0 4 20.05 15.5 5 18.0 5 17.0 5 16.0;proc glm;class variety;model x=variety;means variety/duncan;run;精选课件运行结果运行结果 The GLM Procedure Class Level Information Class Levels Values varie
15、ty 5 1 2 3 4 5 Number of observations 25精选课件 The GLM ProcedureDependent Variable: x Sum ofSource DF Squares Mean Square F Value Pr FModel 4 46.49833333 11.62458333 5.99 0.0025Error 20 38.84166667 1.94208333Corrected Total 24 85.34000000 R-Square Coeff Var Root MSE x Mean 0.544860 7.565616 1.393587 1
16、8.42000 Source DF Type I SS Mean Square F Value Pr F variety 4 46.49833333 11.62458333 5.99 0.0025 Source DF Type III SS Mean Square F Value Pr Fvariety 4 46.49833333 11.62458333 5.99 0.0025精选课件 The GLM Procedure Duncans Multiple Range Test for x NOTE: This test controls the Type I comparisonwise er
17、ror rate, not the experimentwise error rate. Alpha 0.05 Error Degrees of Freedom 20 Error Mean Square 1.942083 Harmonic Mean of Cell Sizes 4.83871 NOTE: Cell sizes are not equal. Number of Means 2 3 4 5 Critical Range 1.869 1.962 2.021 2.062精选课件 Means with the same letter are not significantly diffe
18、rent. Duncan Grouping Mean N variety A 20.1667 6 1 A A 19.6250 4 4 A B A 18.3000 5 3 B B 17.1667 6 2 B B 16.6250 4 5精选课件两因素交叉分组试验单独观测值资料的方差分析(教材【例5.5】) data anova3;input field method x;cards;1 1 71 1 2 73 1 3 77 2 1 90 2 2 90 2 3 923 1 59 3 2 70 3 3 80 4 1 75 4 2 80 4 3 825 1 65 5 2 60 5 3 67 6 1 82
19、 6 2 86 6 3 85;proc anova;class field method;model x=field method;means field method/duncan;run;精选课件运行结果运行结果 The ANOVA Procedure Class Level Information Class Levels Values field 6 1 2 3 4 5 6 method 3 1 2 3 Number of observations 18精选课件 The ANOVA ProcedureDependent Variable: x Sum ofSource DF Squar
20、es Mean Square F Value Pr FModel 7 1576.555556 225.222222 13.97 0.0002Error 10 161.222222 16.122222Corrected Total 17 1737.777778 R-Square Coeff Var Root MSE x Mean 0.907225 5.222144 4.015249 76.88889Source DF Anova SS Mean Square F Value Pr Ffield 5 1435.111111 287.022222 17.80 0.0001 method 2 141.
21、444444 70.722222 4.39 0.0429精选课件The ANOVA Procedure Duncans Multiple Range Test for x NOTE: This test controls the Type I comparisonwise error rate, not the experimentwise error rate. Alpha 0.05 Error Degrees of Freedom 10 Error Mean Square 16.12222 Number of Means 2 3 4 5 6 Critical Range 7.305 7.6
22、33 7.827 7.951 8.033精选课件Means with the same letter are not significantly different. Duncan Grouping Mean N field A 90.667 3 2 A B A 84.333 3 6 B B C 79.000 3 4 C D C 73.667 3 1 D D E 69.667 3 3 E E 64.000 3 5精选课件 The ANOVA Procedure Duncans Multiple Range Test for x NOTE: This test controls the Type
23、 I comparisonwise error rate, not the experimentwise error rate. Alpha 0.05 Error Degrees of Freedom 10 Error Mean Square 16.12222 Number of Means 2 3 Critical Range 5.165 5.398精选课件Means with the same letter are not significantly different. Duncan Grouping Mean N method A 80.500 6 3 A B A 76.500 6 2
24、 B B 73.667 6 1精选课件两因素交叉分组试验有重复观测值资料的方差分析(教材【例5.6】) data anova4;input density fert x;cards;1 1 27 1 2 26 1 3 31 1 4 30 1 5 25 1 1 29 1 2 25 1 3 30 1 4 30 1 5 251 1 26 1 2 24 1 3 30 1 4 31 1 5 26 1 1 26 1 2 29 1 3 31 1 4 30 1 5 242 1 30 2 2 28 2 3 31 2 4 32 2 5 28 2 1 30 2 2 27 2 3 31 2 4 34 2 5 292
25、1 28 2 2 26 2 3 30 2 4 33 2 5 28 2 1 29 2 2 25 2 3 32 2 4 32 2 5 273 1 33 3 2 33 3 3 35 3 4 35 3 5 30 3 1 33 3 2 34 3 3 33 3 4 34 3 5 293 1 34 3 2 34 3 3 37 3 4 33 3 5 31 3 1 32 3 2 35 3 3 35 3 4 35 3 5 30;proc anova;class density fert;model x=density fert density*fert;means density fert/duncan;mean
26、s density*fert/lsd;run;精选课件运行结果运行结果 The ANOVA Procedure Class Level Information Class Levels Values density 3 1 2 3 fert 5 1 2 3 4 5 Number of observations 60精选课件 The ANOVA ProcedureDependent Variable: x Sum ofSource DF Squares Mean Square F Value Pr FModel 14 573.3333333 40.9523810 33.51 Fdensity 2
27、 315.8333333 157.9166667 129.20 .0001fert 4 207.1666667 51.7916667 42.38 FModel 5 444.3500000 88.8700000 1720.06 Fplant 2 416.7800000 208.3900000 4033.35 .0001leaf(plant) 3 27.5700000 9.1900000 177.87 FModel 8 55.05833333 6.88229167 51.75 Fvariety 5 52.37833333 10.47566667 78.76 FModel 12 35.5032000
28、0 2.95860000 10.88 0.0001Error 12 3.26320000 0.27193333Corrected Total 24 38.76640000 R-Square Coeff Var Root MSE x Mean 0.915824 5.867150 0.521472 8.888000Source DF Type I SS Mean Square F Value Pr Fnd 4 32.20640000 8.05160000 29.61 FModel 9 332.6250000 36.9583333 17.06 Fa 3 98.7916667 32.9305556 1
29、5.20 0.0001b 1 77.0416667 77.0416667 35.56 .0001block 2 20.3333333 10.1666667 4.69 0.0276a*b 3 136.4583333 45.4861111 20.99 FModel 17 3765.737222 221.513954 33.39 F block 2 17.137222 8.568611 1.29 0.2991a 2 1309.723889 654.861944 98.71 .0001a*block 4 40.501111 10.125278 1.53 0.2368b 3 1975.956667 65
30、8.652222 99.28 .0001a*b 6 422.418333 70.403056 10.61 FModel 1 174.88878 174.88878 16.40 0.0049Error 7 74.66678 10.66668Corrected Total 8 249.55556 Root MSE 3.26599 R-Square 0.7008 Dependent Mean 7.77778 Adj R-Sq 0.6581 Coeff Var 41.99128精选课件 Parameter Estimates Parameter StandardVariable DF Estimate
31、 Error t Value Pr |t| Intercept 1 48.54932 10.12779 4.79 0.0020 x 1 -1.09962 0.27157 -4.05 0.0049精选课件协方差分析 (教材【例9.3】) data anaocov1;input treat x y;cards;1 36 89 1 30 80 1 26 74 1 23 80 1 26 851 30 68 1 20 73 1 19 68 1 20 80 1 16 582 28 64 2 27 81 2 27 73 2 24 67 2 25 772 23 67 2 20 64 2 18 65 2 17 59 2 20 573 28 55 3 33 62 3 26 58 3 22 58 3 23 663 20 55 3 22 60 3 23 71 3 18 55 3 17 484 32 52 4 23 58 4 27 64 4 23 62 4 27 544 28 54 4 20 55 4 24 44 4 19 51 4 17 51;proc glm;class treat;model y=x treat/solution;means treat/duncan;lsmeans treat
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2025年可调控辊型四辊液压轧机合作协议书
- 2022-2023学年广西玉林市容县四年级(上)期末数学试卷
- 新译林六年级英语上册教案(全册)
- 2025年临时工协议常用版(2篇)
- 2025年二手数控机床买卖合同(2篇)
- 2025年五年级下册语文教学工作总结样本(3篇)
- 2025年人事代理员工劳动合同常用版(4篇)
- 2025年仓储运输合同标准版本(4篇)
- 2025年互联网技术服务合同样本(三篇)
- 专题01 集合、逻辑用语与复数(解析版)
- 2022年湖南公务员考试《申论》真题套卷(乡镇卷)2
- 【薪酬】国有企业中长期股权激励课件
- 《新闻摄影教程(第五版)》第三章 新闻摄影工作者的职责与素养
- 学前儿童行为观察第一章观察概述课件
- 化学品防范说明编码
- 高温超高压煤气发电工程技术方案
- 帕金森病(英文版)课件
- 大学普通化学(第七版)课后答案
- 玉米栽培技术(培训)
- 化工企业三违清单不安全安全行为清单
- 解析贝壳找房商业模式
评论
0/150
提交评论