1 / 22

生物统计教研室

SAS 概述. 生物统计教研室. wangbingshun@tom.com. 常用统计软件包简介. SAS 统计分析系统( Statistical Analysis System ) SPSS 统计软件包( Statistical Package for the Social Science ---Renamed as…Predictive Analytics- 预测分析技术提供者)

nascha
Télécharger la présentation

生物统计教研室

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. SAS概述 生物统计教研室 wangbingshun@tom.com

  2. 常用统计软件包简介 • SAS统计分析系统(Statistical Analysis System) • SPSS统计软件包(Statistical Package for the Social Science ---Renamed as…Predictive Analytics-预测分析技术提供者) • Stata: A full data-management system with complete statistical and graphical capabilities (http://www.stata.com/) • S-plus: The premier solution for exploratory data modeling and statistical analysis. • PEMS统计软件包(Package for encyclopaedia of medical statistics) NoSA…

  3. SAS概述 • SAS—Statistical Analysis System 美国SAS软件研究所(SAS Institute Inc) (近二十八年来,SAS始终致力于为全球客户提供理性决策的力量 The Power to Know) • 国际上通用的数据分析的标准软件 权威性的统计分析软件 (按行业划分的全球客户群企业: 商业:73.3%;教育机构:16.8%;政府部门:9.9%)

  4. SAS概述 SAS优点: 1. 国内外通用 2. 数据管理功能全面,方便 3. 大型统计软件包→数据分析功能齐全 4. 窗口管理系统→直观和方便

  5. 案例 • 中国海关使用SAS 来审核偷税漏税、指导地方当局打击走私 (http://www.sas.com/offices/asiapacific/china/success/technology.html#DataMiningandStatisticalAnalysis) • 上海宝钢使用SAS软件来提高产品质量和改进供货流程 (在竞争中领跑) (http://www.sas.com/offices/asiapacific/china/success/shanghaibaosteel.html) 解决方案:SAS解决方案,包括SAS/IntrNet 和Enterprise Miner,增强数据仓库、数据挖掘和在线报告技术和服务。

  6. SAS功能 • 分析智能: 数据挖掘和统计分析 预测和计量经济学 运筹调研 质量改进 • 商业智能 : 应用开发 | 内容提供 | 查询和报表 • 数据仓库: STAT SAS/BASE(Core)

  7. 医学统计中的应用 • 为绝大多数医学研究所采用 • 论文上写明: “采用SAS…进行数据的统计分析”

  8. SAS安装 • 根据安装说明,要拷入“C:\Program Files”文件夹: C:\Program Files\SAS Institute\SAS\V8 • 参考程序 • 教材例题程序和所用到的数据文件安装在“C:\Program Files\SAS Institute\SAS\SASCLASS”文件夹中 • 附录一上机实习题参考程序和所用数据文件安装在“C:\Program Files\SAS Institute\SAS\SASEXER”文件夹中

  9. 运行SAS 如何进入SAS? 方法: 1.在Windows桌面双击“SAS快捷方式”。 2. C:\Program Files\SAS Institute\SAS\V8子目录中双击sas.exe

  10. ===SAS windows=== • Editor Where code is written or imported, and submitted • Log What happened, including what went wrong • Output Results of procedures in the program… • Explorer Shows libraries, their files, and where you can see data, graphs etc • Results Shows how the output is made up of tables, graphs, datasets etc

  11. SAS实际操作界面 • 编写程序:程序编辑窗口 • 运行程序:F8 | F3 | Submit | Run小人图标 • 看运行信息:LOG窗口 (有无红字等警告信息) • 看运行结果: OUTPUT窗口

  12. 实习内容 • (参考第二章、第三章) • 上机实习1:熟悉SAS操作界面 • 上机实习2:SAS数据集的建立 • 上机实习3:计量资料的描述性统计 SAS安装现场演示 程序示例与解读

  13. SAS Programs A SAS program is a sequence of steps that the user submits for execution. RawData DATA steps are typically used to create SAS data sets. Report DATAStep PROCStep SASData Set SASData Set PROC steps are typically used to process SAS data sets (that is, generate reports and graphs, edit data, and sort data).

  14. 观察单位observations个体 数据结构建立 (Excel) 变量variables 字符型变量:job $... 数值型变量:age…

  15. 数据(集)格式 ①统计表格格式 (收集原始数据) ②统计分析格式 组别 变量值 1 0.1 1 0.21 0.32 0.42 0.53 0.63 0.73 0.83 0.9 • OK

  16. SAS 数据集的建立 *Method A; data a; input sex age tc tg ldl hdl apoa apob chd; cards; 1 55 4.17 1.38 2.38 1.16 143.4 93.7 1 1 50 5.81 6.20 1.88 1.09 144.3 96.1 1 … 1 52 5.09 0.74 3.23 1.63 120.8 131.0 0 ; proc printdata=a;run; *Method B: FromExecel sheet to SAS dataset;

  17. Raw Data Read in Data Process Data (Create new variables) Output Data (Create SAS Dataset) Analyze Data Using Statistical Procedures Data Step PROCs

  18. SAS Programs data shg; input x @@; cards; 108.0 97.6 103.4 101.6 104.4 98.5 ..... 99.8 108.3 104.0 100.6 112.6 103.7 ; run; proc means data=shg n mean std min max; var x; run; DATA Step PROC Steps

  19. SAS语句和SAS程序 1.SAS语句 SAS语句由关键字、SAS名、特殊字符或运算符组成,并以分号(;)结尾。SAS语句可以一行写一个语句,也可以一行写多个语句。 2.SAS名 SAS名由1-8个字符组成,且必须以字母或下划线开头,后续字符可以是字母、数字或下划线。 3.系统保留名:系统采用开头与结尾均以下划线作标记的SAS名,如:_NULL_、_N_。

  20. DATA & PROC STEPS • DATA STEP • Create a dataset which SAS can use • PROC STEP • Do something to the dataset • Printing, Graphing, Analyzing

  21. SAS Program-初学者常见错误 Problems • Bad syntax • Missing “ ; ” at end of line

More Related