SAS 中的空值表示方法
在 SAS 中,观测值为空可以用两种方式表示:
- 用点号(.)表示空值,例如:
data test;
input x y;
cards;
1 .
. 3
5 6
. .
;
run;
在这个例子中,第一行第二列和第四行都是空值。
- 使用缺失值函数 MISSING() 表示空值,例如:
data test;
input x y;
if missing(y) then put 'Y is missing';
cards;
1 .
. 3
5 6
. .
;
run;
在这个例子中,如果 Y 的值为空,则输出 'Y is missing'。
原文地址: https://www.cveoy.top/t/topic/mZdR 著作权归作者所有。请勿转载和采集!