ImageVerifierCode 换一换
格式:DOCX , 页数:25 ,大小:26.32KB ,
资源ID:17824185      下载积分:3 金币
快捷下载
登录下载
邮箱/手机:
温馨提示:
快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。 如填写123,账号就是123,密码也是123。
特别说明:
请自助下载,系统不会自动发送文件的哦; 如果您已付费,想二次下载,请登录后访问:我的下载记录
支付方式: 支付宝    微信支付   
验证码:   换一换

加入VIP,免费下载
 

温馨提示:由于个人手机设置不同,如果发现不能下载,请复制以下地址【https://www.bdocx.com/down/17824185.html】到电脑端继续下载(重复下载不扣费)。

已注册用户请登录:
账号:
密码:
验证码:   换一换
  忘记密码?
三方登录: 微信登录   QQ登录  

下载须知

1: 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。
2: 试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。
3: 文件的所有权益归上传用户所有。
4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
5. 本站仅提供交流平台,并不能对任何下载内容负责。
6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

版权提示 | 免责声明

本文(超经典的SAS BASE的笔记6Word文档下载推荐.docx)为本站会员(b****3)主动上传,冰豆网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知冰豆网(发送邮件至service@bdocx.com或直接QQ联系客服),我们立即给予删除!

超经典的SAS BASE的笔记6Word文档下载推荐.docx

1、o Double - double spaces the printed output.o Label - uses variable labels as column headings (variable name is default heading).o Noobs - suppresses the observation number in the output.Example 1 List containing all the variables and all the observations.data a; input year sales cost; profit=sales-

2、cost; cards;1981 12132 110211982 19823 129281983 16982 140021984 18432 14590;run;proc print data=a; title Simple PROC PRINT ReportExample 2 Removal of column OBS and impression limited to the first 5 observations.data exprev; input Region $ State $ Month monyy5. Expenses Revenues; format month monyy

3、5.; datalines;Southern GA JAN95 2000 8000Southern GA FEB95 1200 6000Southern FL FEB95 8500 11000Northern NY FEB95 3000 4000Northern NY MAR95 6000 5000Southern FL MAR95 9800 13500Northern MA MAR95 1500 1000proc print data=exprev(obs=5) noobs; var month state expenses;Monthly Expenses for Offices in E

4、ach StateExample 3 Instruction ID with not sorted observationsdata bid; input id age;987 65687 75254 55236 70proc print;Example 4 Instruction ID, after sorting of the observations.data bid2; input pat_id age;proc sort; by pat_id; *var pat_id; id pat_id;Example 5 Test of one or the other condition, i

5、nstruction WHEREdata bid3;proc print noobs; var age; where age 500 OR tot_vendor20000; SUM quantite tot_vendor;RUN;Example 7 Instructions SUM and BY statement data trim2;proc sort ; by vendor;PROC PRINT DATA=trim2 NOOBS;Summary by VenderExample 8 Instruction PAGEBY and SUMBYdata trim3;PROC PRINT DAT

6、A=trim3 NOOBS; SUMBY vendor; PAGEBY vendor;Pageby option controls page ejects that occur before a page is full.Sumby option limits the number of sums that appear in the report.Example 9 Options with Label, Double, Title and FootnotePROC PRINT DATA=trim5 NOOBS label double;Summary by Vendor FOOTNOTE

7、Results of Data-trim4 LABEL vendor = Vendor mois = Mois quantite = Quantity of Vendor tot_vendor = Total of VendorsThe FREQ procedure produces one-, two- , n-way (crosstabulation) frequency tables. The SAS procedure PROC FREQ is commonly used to produce summary data in tabular form. It can be used o

8、n either character or numeric data. Statistical analysis will be followed later. Seven examples are shown here using this procedure on freq_x dataset. The following is a summary of options and optional statements that can be used with PROC FREQ. Optional statements can be in any order, while options

9、 are entered at the end of the TABLES statement, following / and before Note that this list represents only a portion of all available to the user from SAS: TABLES - optional statement for specifying the variables to be included in the analysis. WEIGHT - optional statement for specifying the variabl

10、es to be summed for each value of the variables specified in the TABLES statement. MISSING - option to include missing values in the calculations within the table. MISSPRINT - option to display the missing values in the tables without including them in the calculations. LIST - option to list values

11、of variables side by side rather than in tabular form. OUT= - option to create a data set containing the output generated by the TABLES statement. There are some of options, Nofreq, Norow, Nocol, Nopercent et al.Syntax: PROC FREQ options;BY variables;TABLES requests WEIGHT variable;Example 1: simple

12、 outputdata freq_01; input name $ sex $ age height ;Allan M 25 174Ben M 23 176Christine F 24 164David M 32 174Edwards M 36 178Frank . 38 172Glory F 28 166Hill M 32 170Jack M 33 172Katy . 26 162Lily F 24 169Paula F . 163proc freq data=freq_01; title1 PROC FREQ: example 01 title2 No keywords specified

13、Example 2: One-way tableproc freq data=freq_02; tables sex age;1-way tables for sex and age specified by TABLES keywordExample 3: 2-way tablesproc freq data=freq_03; tables sex*age;two-way tables for sex and age specified by TABLES keywordExample 4: 2-way tables listing of the values of the variable

14、s side by sideproc freq data=freq_04; tables sex*age/list missing;two-way tables using list and missingExample 5: 3 way tablesproc freq data=freq_05; tables name*sex*age ;3 way table: height by weight, controlling for name /*The first variable represents the control variable*/;Example 6: Weight data

15、DATA freq_06 ; INPUT rater1 rater2 count;DATALINES;1 1 5 1 2 2 1 3 1 2 1 1 2 2 7 2 3 2 3 1 1 3 2 2 3 3 9 PROC FREQ DATA = freq_06 ; WEIGHT count; TABLE rater1*rater2 ; TITLE1 weighted dataExample 7: Out option tables age /out =freq_07; create new dataset using out optionExample 8: Missing / Missprin

16、t tables sex /missing ;/*misprint*/Example 9: NLEVELSinput agegrp sex $ ;1 F 1 F 1 M 2 M 2 M 3 F 3 F 3 Fproc freq data=a nlevels;tables sex*agegrp/noprint;This option in PROC FREQ statement is used to display the “Number of Variable Levels” . By using this options we can get the distinct count for e

17、ach variable listed in the TABLES statement. It is best to use NLEVELS and NNOPRINT options option to know the number of levels of variable before printing the frequency table if the data set is too large in size and if you unaware of what could be distinct count for each variable.Example 10: CROSSL

18、ISTdisplays crosstabulation tables in ODS column format. This option creates a table that has a table definition that you can customize by using the TEMPLATE procedure.tables sex*agegrp/crosslist;Warning: you cannot specify both the LIST option and the CROSSLIST option in the same TABLES statement.T

19、he CROSSLIST option looks the same as LIST option, but there are few differences as shown below.CROSSLIST LISTStatistics FREQUENCY FREQUENCYPERCENT PERCENTROW PERCENT CUMULATIVE FREQUENCYCOLUMN PERCENT CUMULATIVE PERCENTTotals Produces sub totals and final totals. No totalsRows with Display the vari

20、able levels with Suppress the variable levels withzero frequencies zero frequencieszero freqPROC MEANS only be performed on numeric data This procedure gives the following summary statistics (if no options are specified) for each variable listed in the VAR statement: number of observations, mean, standard deviation, minimum value, maximum value, and standard error of the mean. Options: You can select which statistics you want to have printed from the following list: N, NMISS (number of missing values), MEAN, STD, VAR, MIN, MAX, SKEWNESS, KURTOSIS, lclm and uclm options produ

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1