2217 2

[问答] SAS BASE的一道题关于proc report [推广有奖]

  • 0关注
  • 0粉丝

硕士生

48%

还不是VIP/贵宾

-

威望
0
论坛币
432 个
通用积分
0
学术水平
0 点
热心指数
0 点
信用等级
0 点
经验
481 点
帖子
77
精华
0
在线时间
66 小时
注册时间
2017-2-23
最后登录
2022-1-27

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

求职就业群
赵安豆老师微信:zhaoandou666

经管之家联合CDA

送您一个全额奖学金名额~ !

感谢您参与论坛问题回答

经管之家送您两个论坛币!

+2 论坛币
What output does this PROC REPORT step produce?
  1. proc report data=sasuser.houses nowd;
  2. column style sqfeet bedrooms price;
  3. run;
复制代码
a. a list report ordered by values of the first variable in the COLUMN statement
b. a summary report ordered by values of the first variable in the COLUMN statement

c. a list report that displays a row for each observation in the input data set and which
calculates the SUM statistic for numeric variables

d. a list report that calculates the N (frequency) statistic for character variables


答案是c
然后我不明白,因为我打了程序,也没有计算出数值型数据的SUM



二维码

扫码加我 拉你入群

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

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

关键词:proc report SAS base Report repor Base report

沙发
foocares 发表于 2017-4-27 11:10:31 |只看作者 |坛友微信交流群
这题出得不大好,但它的意思是,在proc report里,那些数值型的变量默认的统计量是求和,原文可以在prep guide里找到:

PROC REPORT uses each variable in one of six ways (DISPLAY, ORDER, GROUP, ACROSS,
ANALYSIS, or COMPUTED). By default, PROC REPORT uses
 character variables as display variables
 numeric variables as analysis variables, which are used to calculate the SUM statistic.

假如题中的代码任意定义一列是group, 比如:
proc report data=sasuser.houses nowd;
column style sqfeet bedrooms price;
define style /group;
run;

那么这时候其他三个在报表里的变量sqfeet bedrooms price如无额外声明,将自动按组来做求和统计输出。

使用道具

藤椅
TDDHA 发表于 2017-9-28 09:02:18 |只看作者 |坛友微信交流群
proc report data=a out=b;
column CMTRT DRUGNAME1;
define CMTRT/order;
define CMTRT/group;
run;
其中CMTRT和DRUGNAME1都是字符变量,提示NOTE: 由于 DRUGNAME1 的用法为 DISPLAY,故未创建组。要避免这一注释,请将所有 GROUP 变量更改为 ORDER 变量。
怎么解决?求大神解答

使用道具

您需要登录后才可以回帖 登录 | 我要注册

本版微信群
加好友,备注cda
拉您进交流群

京ICP备16021002-2号 京B2-20170662号 京公网安备 11010802022788号 论坛法律顾问:王进律师 知识产权保护声明   免责及隐私声明

GMT+8, 2024-4-25 09:32