楼主: hailingkatherin
9726 6

关于_ERROR_的问题 [推广有奖]

  • 0关注
  • 0粉丝

已卖:13份资源

硕士生

82%

还不是VIP/贵宾

-

威望
0
论坛币
277 个
通用积分
0
学术水平
1 点
热心指数
5 点
信用等级
1 点
经验
164 点
帖子
126
精华
0
在线时间
87 小时
注册时间
2015-1-18
最后登录
2016-5-15

楼主
hailingkatherin 发表于 2015-2-25 11:05:21 |AI写论文

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

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

经管之家联合CDA

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

感谢您参与论坛问题回答

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

+2 论坛币
Which statement describes a characteristic of the SAS automatic variable_ERROR_? A. The _ERROR_ variable maintains a count of the number of data errors in aDATA step.
B. The _ERROR_ variable is added to the program data vector and becomespart of the data set being created.C. The _ERROR_ variable can be used in expressions in the DATA step.
D. The _ERROR_ variable contains the number of the observation that causedthe data error.
Answer: C
请问大家ABD都错在哪里了?


谢谢大家!
二维码

扫码加我 拉你入群

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

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

关键词:Error err expressions observation Expression ERROR

已有 1 人评分热心指数 信用等级 收起 理由
eijuhz + 2 + 1 鼓励积极发帖讨论

总评分: 热心指数 + 2  信用等级 + 1   查看全部评分

沙发
smyazh12 学生认证  发表于 2015-8-17 17:27:50
同问,这个我也不理解。有大侠能解释下吗?谢谢哈

藤椅
bianyue 发表于 2015-10-12 16:08:20 来自手机
hailingkatherin 发表于 2015-2-25 11:05
Which statement describes a characteristic of the SAS automatic variable_ERROR_? A. The _ERROR_ vari ...
_error判断一个观测是否正确,只有0和1,所以A,D错,自动变量是临时的,不会被储存,B错,
已有 2 人评分学术水平 热心指数 信用等级 收起 理由
wodehezi007 + 1 + 1 + 1 观点有启发
闲看庭花落 + 1 + 1 + 1 精彩帖子

总评分: 学术水平 + 2  热心指数 + 2  信用等级 + 2   查看全部评分

板凳
mandyfervor 发表于 2015-10-12 18:32:26
https://support.sas.com/documentation/cdl/en/lrcon/62955/HTML/default/viewer.htm#a000695104.htm
_ERROR_
is 0 by default but is set to 1 whenever an error is encountered, such as an input data error, a conversion error, or a math error, as in division by 0 or a floating point overflow. You can use the value of this variable to help locate errors in data records and to print an error message to the SAS log.

For example, either of the two following statements writes to the SAS log, during each iteration of the DATA step, the contents of an input record in which an input error is encountered:

if _error_=1 then put _infile_;

if _error_ then put _infile_;

Since _error_ is an automatic variable, it wont be part of output ot the data set. Therefore B is false.

Automatic variables are created automatically by the DATA step or by DATA step statements. These variables are added to the program data vector but are not output to the data set being created. The values of automatic variables are retained from one iteration of the DATA step to the next, rather than set to missing.
已有 1 人评分论坛币 收起 理由
admin_kefu + 20 热心帮助其他会员

总评分: 论坛币 + 20   查看全部评分

报纸
lvdoujiakewa 发表于 2017-8-4 07:52:34
bianyue 发表于 2015-10-12 16:08
_error判断一个观测是否正确,只有0和1,所以A,D错,自动变量是临时的,不会被储存,B错,
谢谢解惑!新手也有相同困惑

地板
windywy 发表于 2017-8-4 22:16:47
A和D, error不代表a count of the number of data errors或者number of obs cause error, error只有0和1两个值, o就是没error, 1就是有error.

B, error这个variable只留在PDV里面, 不会成为最后data file的一部分.
已有 1 人评分论坛币 收起 理由
admin_kefu + 10 热心帮助其他会员

总评分: 论坛币 + 10   查看全部评分

7
jayzhao78 发表于 2017-9-8 20:48:07
学习了,感谢指点迷津。

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

本版微信群
加好友,备注cda
拉您进交流群
GMT+8, 2025-12-9 03:34