全部版块 我的主页
论坛 数据科学与人工智能 数据分析与数据科学 SAS专版
9818 6
2015-02-25
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都错在哪里了?


谢谢大家!
二维码

扫码加我 拉你入群

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

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

全部回复
2015-8-17 17:27:50
同问,这个我也不理解。有大侠能解释下吗?谢谢哈
二维码

扫码加我 拉你入群

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

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

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错,
二维码

扫码加我 拉你入群

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

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

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.
二维码

扫码加我 拉你入群

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

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

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

扫码加我 拉你入群

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

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

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的一部分.
二维码

扫码加我 拉你入群

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

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

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

说点什么

分享

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