楼主: aucklandsvivian
10390 11

SAS里可以把 0 值替换成missing value吗?求code![已解决] [推广有奖]

11
aucklandsvivian 发表于 2012-12-27 11:50:08 |只看作者 |坛友微信交流群
a6566792 发表于 2012-12-26 12:19
不好意思,之前人在外地,  这里的array  _numeric_ 代表所有的数值变量。但是像你这种情况已经知道要处 ...
万分感谢啦

使用道具

12
bobguy 发表于 2012-12-28 00:57:20 |只看作者 |坛友微信交流群
There is no need to recode variable values. A SAS format can deal it easily. Here is an example,

proc format;
value missingValue
      0=.
          other=[best12.]
          ;
        run;
data t1;
   do i=-1 to 5;
      x=i;
          y=ranuni(123);
          z=i;
          c='CHAR';
          output;
        end;
run;

proc print;
format _numeric_ missingValue.;
run;

使用道具

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

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

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

GMT+8, 2024-5-24 17:31