楼主: zchq100
5137 13

[原创博文] 有求某一列数据缺失值个数的函数吗? [推广有奖]

11
zchq100 发表于 2012-6-1 00:09:35
感谢楼上各位高手。

12
bobguy 发表于 2012-6-1 06:55:06
SAS  functions operate on rows. You can use proc means to have a simple statistics for all USEFUL numerc variables.

data t1;
   r=0.1;
   do i=1 to 100;
      x=rannor(123); x2=(x+r*rannor(123))/sqrt(1+r**2);
          y=0.001+1*x+1*x2>rannor(123);
          if mod(i,5)=0 then x=.;
      else if mod(i,6)=0 then x2=.;
          output;
        end;
run;

proc means data=t1 n nmiss mean std skew kurt;
var _numeric_;
run;

13
sunset1986 发表于 2012-7-3 14:24:39
bobguy 发表于 2012-6-1 06:55
SAS  functions operate on rows. You can use proc means to have a simple statistics for all USEFUL nu ...
赞!!!!!
An honest tale speeds best being plainly told.
Cheers!

14
darkworld 发表于 2012-7-3 15:20:14
bobguy 发表于 2012-6-1 06:55
SAS  functions operate on rows. You can use proc means to have a simple statistics for all USEFUL nu ...
对啊,直接用proc means的nmiss不是很方便?

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

本版微信群
加好友,备注cda
拉您进交流群
GMT+8, 2026-1-2 01:12