全部版块 我的主页
论坛 数据科学与人工智能 数据分析与数据科学 SAS专版
6213 8
2010-04-26
我希望用proc  tabulate 做一个表格 只因自己接触的sas的太少了 只能绘出其中一部分  希望高手指点!在此谢谢大家啦
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

全部回复
2010-4-26 15:59:45
建议看下SAS帮助 上手应该很快的
给个程序举例
libname clinic 'c:\users\reports\year5\data';
     proc tabulate data=clinic.admit format=6.;
        class actlevel sex;
        var fee;
        table fee;
        table actlevel all,fee;
        table sex,actlevel all,fee;
        keylabel all='All Patients';           
     run;
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2010-4-27 12:26:14
http://www.pinggu.org/bbs/thread-549098-1-1.html 这里有,你去看看吧。
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2010-4-28 10:43:51
先谢谢上门两位的回复 但是我现在就是想问下 我的行向量是日期 也就是从1日到31  列变量是时间 也就是一天24小时  分析变量就是温度   但是我只能实现时间从0-23时  我想得到的是从21时-20时  请问下这个该怎么办呢?
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2010-4-28 14:23:11
请参阅tabulate的用法
PROC TABULATE <option(s)>;
starts the procedure.

You can specify the following options in the PROC TABULATE statement:

DATA=SAS-data-set
specifies the SAS-data-set to be used by PROC TABULATE. If you omit the DATA= option, then the TABULATE procedure uses the SAS data set that was created most recently in the current job or session.

FORMAT=format-name
specifies a default format for formatting the value in each cell in the table. You can specify any valid SAS numeric format or user-defined format.

MISSING
considers missing values as valid values to create the combinations of class variables. A heading for each missing value appears in the table.

ORDER=DATA | FORMATTED | FREQ | UNFORMATTED
specifies the sort order that is used to create the unique combinations of the values of the class variables, which form the headings of the table. A brief description of each sort order follows:

DATA
orders values according to their order in the input data set.

FORMATTED
orders values by their ascending formatted values. This order depends on your operating environment.

FREQ
orders values by descending frequency count.

UNFORMATTED
orders values by their unformatted values, which yields the same order as PROC SORT. This order depends on your operating environment. This sort sequence is particularly useful for displaying dates chronologically.

ORDER= used on a CLASS statement overrides ORDER= used on the PROC TABULATE statement.
CLASS variable(s)/option(s);
identifies class variables for the table. Class variables determine the categories that PROC TABULATE uses to calculate statistics.

MISSING
considers missing values as valid values to create the combinations of class variables. A heading for each missing value appears in the table. If MISSING should apply only to a subset of the class variables, then specify MISSING in a separate CLASS statement with the subset of the class variables.

ORDER=DATA | FORMATTED | FREQ | UNFORMATTED
specifies the sort order used to create the unique combinations of the values of the class variables, which form the headings of the table. If ORDER= should apply only to a subset of the class variables, then specify ORDER= in a separate CLASS statement with the subset of the class variables. In this way, a separate sort order can be specified for each class variable. A brief description of each sort order follows:

DATA
orders values according to their order in the input data set.

FORMATTED
orders values by their ascending formatted values. This order depends on your operating environment.

FREQ
orders values by descending frequency count.

UNFORMATTED
orders values by their unformatted values, which yields the same order as PROC SORT. This order depends on your operating environment. This sort sequence is particularly useful for displaying dates chronologically.

ORDER= used on a CLASS statement overrides ORDER= used on the PROC TABULATE statement.
VAR analysis-variable(s);
identifies analysis variables for the table. Analysis variables contain values for which you want to compute statistics.

TABLE <<page-expression, >row-expression,> column-expression;
defines the table that you want PROC TABULATE to produce. You must specify at least one TABLE statement. In the TABLE statement you specify page-expressions, row-expressions, and column-expressions, all of which are constructed in the same way and are referred to collectively as dimension expressions. Use commas to separate dimension expressions from one another. You define relationships among variables, statistics, and other elements within a dimension by combining them with one or more operators. Operators are symbols that tell PROC TABULATE what actions to perform on the variables, statistics, and other elements. The table that follows lists the common operators and the actions that they symbolize:
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2010-4-30 01:14:47
proc tabulate data=xxx missing;
var templature;
class day hour;
table day="日期"*hour="时间";sum(xxxx) n="";
run;
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

点击查看更多内容…
相关推荐
栏目导航
热门文章
推荐文章

说点什么

分享

扫码加好友,拉您进群
各岗位、行业、专业交流群