由买买提看人间百态

topics

全部话题 - 话题: nmissed
1 (共1页)
p********a
发帖数: 5352
1
来自主题: Statistics版 - SAS问题来了
just use the function nmiss(var)
proc sql;
select nmiss(var1),nmiss(var2)...from a;quit;
p********a
发帖数: 5352
2
It is easier to use Proc sql; select Nmiss(var1),Nmiss(var2)....
k*******a
发帖数: 772
3
来自主题: Statistics版 - 神奇的proc means
不好意思,那个好像也不行,不过你可以先 reshape data比如
data a;
do i=1 to 8;
x=1; y=1;output;
end;
run;
data b(keep=var z);
set a(rename=(x=z) in=inx) a(rename=(y=z) in=iny);
if inx then var='x';
else if iny then var='y';
run;
proc means data=b noprint;
by var;
var z;
output out=c(drop=_freq_ _type_) n=n nmiss=nmiss min=min max=max;
run;
l******m
发帖数: 111
4
来自主题: Statistics版 - SAS问题求助
或者你也可以用nmiss和cmiss 函数
DATA B;
SET A;
ARRAY NUM[*] _NUMERIC_;
ARRAY CHAR[*] _CHARACTER_;
IF NMISS(OF NUM[*]) THEN DELETE;
IF CMISS(OF CHAR[*]) THEN DELETE;
RUN;
w********r
发帖数: 238
5
来自主题: Statistics版 - sas proc means 问题
Output dataset 只有5个default statistics variables. 有么有什么简单的办法加一
些其他的,比如nmiss. 网上查了一下,都好复杂。要不然只有单独做 nmiss 的,然后
再 set.
S*******n
发帖数: 10009
6
来自主题: Stock版 - JP Morgan nmissed, down 0.81%
银行开报了.
E*****n
发帖数: 7961
7
来自主题: Stock版 - JP Morgan nmissed, down 0.81%
Beat
[在 Stevenson (蝌蚪SSSS) 的大作中提到:]
:银行开报了.
S*******n
发帖数: 10009
8
来自主题: Stock版 - JP Morgan nmissed, down 0.81%
J.P. Morgan's revenue falls and misses estimates
Revenue fell to $23.54 billion. Analysts had expected $23.69 billion.
E*****n
发帖数: 7961
9
来自主题: Stock版 - JP Morgan nmissed, down 0.81%
EPS beat 本来就预计revenue miss
估计就这么安全的过了
[在 Stevenson (蝌蚪SSSS) 的大作中提到:]
:J.P. Morgan's revenue falls and misses estimates
:Revenue fell to $23.54 billion. Analysts had expected $23.69 billion.
:...........
B******e
发帖数: 16928
10
来自主题: Stock版 - JP Morgan nmissed, down 0.81%
Looks like WFC is the only bank that will beat expectations.
C*K
发帖数: 400
11
来自主题: Stock版 - JP Morgan nmissed, down 0.81%
摩根大通第三季度每股盈利1.32美元,预期1.37美元,前值1.35美元。
第三季度营收235亿美元,预期240亿美元,前值251亿美元。
S*******n
发帖数: 10009
12
来自主题: Stock版 - JP Morgan nmissed, down 0.81%
WFC,PNC都可以吧.
B******e
发帖数: 16928
13
来自主题: Stock版 - JP Morgan nmissed, down 0.81%
Yeah, not paying too much attention to PNC, but those with small trading
operations are in general faring well.
x*******u
发帖数: 500
14
来自主题: Statistics版 - 请教SAS 问题
只想出这个笨办法, 有没有更简单的
data a;
input x y z m n;
cards;
1 2 3 . 4
2 3 4 5 6
1 . 3 5 6
1 3 4 . .
;
run;
proc contents data=a out=out(keep=name); run;
proc sql noprint;
select name into: name separated by ' ' from out;
run;
proc transpose data=a out=b;
run;
data c; set b;
missnum=nmiss(of col1-col4);
run;
data d(where=(missnum=0))
e(where=(missnum>0));
set c;
run;
s*********e
发帖数: 1051
15
来自主题: Statistics版 - overall mean in sas for several variables
data two;
set one;
array a{*} _numeric_;
do i = 1 to dim(a);
xyz = a{i};
output;
end;
run;
proc means data = two n nmiss mean;
var xyz;
run;
o****o
发帖数: 8077
16
data _null_;
if _n_=1 then do;
length name $ 32;
declare hash h();
h.defineKey('name');
h.defineData('name', 'nmiss');
h.defineDone();
end;
set yourtable end=eof;
array _c{*} _character_;
if _n_=1 then do
j=1 to dim(_c); _x=vname(_c[j]); put _x=;
if dim(_c)=1 then stop;
end;

do j=2 to dim(_c);
if missing(_c[j]) then do;
if h.find(key:vname(_c[
b******e
发帖数: 539
17
proc summary data=xxxx;
var _character_;
output out=test nmiss=;
run;
D******n
发帖数: 2836
18
This just simply doesn't work. nmiss is for numerics i guess.
a********s
发帖数: 188
19
提示点思路吧。。。
(1)可以先用proc contents输出每个variable name
(2)用 call symput 建立一组macro variables, ex: var1, var2,...
(3) 在proc sql中用DO Loop 算 nmiss(&&var&i)...
这样应该可以实现。 我以前写过一个简单的算每个变量的missing proportion的macro
。找不到在哪里了。。。 相信proc means也很好实现。
b******e
发帖数: 539
20
proc means or proc summary
the following code counts missing values for all numeric variables in your
data set by id:
proc summary data=survey nway;
class id;
var _numeric_;
output out=summ (drop=_type_ _freq_) nmiss=;
run;
proc print data=summ; run;
D******n
发帖数: 2836
21
来自主题: Statistics版 - 新手问个问题 (转载)
create a .vim directory under you home directory(there is a dot before
vim)
and then create a syntax directory under it
and then create a sas.vim file under the syntax directory
==============sas.vim======================
if version < 600
syntax clear
elseif exists("b:current_syntax")
finish
endif
syn case ignore
syn region sasString start=+"+ skip=+\\|\"+ end=+"+
syn region sasString start=+'+ skip=+\\|\"+ end=+'+
" Want region from 'cards;' to ';' to be captured (Bob Heckel)
sy... 阅读全帖
l*********s
发帖数: 5409
22
来自主题: Statistics版 - 老问题如何产生missing table
a stupid solution, transpose then nmiss function
b*****e
发帖数: 223
23
来自主题: Statistics版 - SAS question(ergent)
use array
Or, does nmiss work for both num or char? I am not sure
n**m
发帖数: 156
24
来自主题: Statistics版 - 问个SAS问题
data yourdata;
set yourdata;
if cmiss(of _character_) > 0 or nmiss(of _numeric_) >0 then delete;
run;
R*********i
发帖数: 7643
25
来自主题: Statistics版 - SAS问题请教
nmiss
D******n
发帖数: 2836
26
来自主题: Statistics版 - 神奇的proc means
this way works, but stacking data is not that efficient. I came up with this
, just do more data manipulation on the means output.
----------------------------------------------->
data a1;
input x_1 y z weight;
datalines;
1 0 4 0.1
1 0 4 0.5
0 1 1 0.2
0 1 1 0.2
1 0 2 0.1
0 1 2 0.5
1 0 3 0.2
0 1 3 0.2
;
run;
proc means data=a1 noprint;
var x_1 y z;
weight weight;
output out=b sum= mean= nmiss=/autoname;
run;
proc transpose data=b(drop= _type_ _freq_) out=b2;run;
data b2;
... 阅读全帖
w*******n
发帖数: 469
27
来自主题: Statistics版 - SAS question,thanks!
if nmiss(of _numeric_) or cmiss( of _character_) then delete;
c*******r
发帖数: 323
28
不是用output = 那个,要在result window 里那个table
我想做的是对任意一个table列出所有variables的min max mean n nmiss std
1 (共1页)