由买买提看人间百态

topics

全部话题 - 话题: alt48si
(共0页)
f********t
发帖数: 117
1
来自主题: Statistics版 - help for sas program
I have a couple of ideas. they are pretty much same.
create of new column which is the product of all the 36 columns. this asume
they are all numbers.
then you check to see newcolumn is .
same idea in proc sql .
SELECT * from (select S.*, COALESCE (s.ALT48SI, .... 36 columns) AS
newcolumn from spt_dloc) nn where newcolumn = .
or you can do select * from spt_dloc where ALT48SI = . and 36 columns here.
a********a
发帖数: 346
2
来自主题: Statistics版 - help for sas program
I am cleaning a data set as following, if all 36 variable are missing, I am
going to delete the observation. The following program works for me, but I
do not think it is a good program. Please help me if you have a better idea
to change the array part of my program.
Thanks
data mis;
set spt_dloc;
array m{36} ALT48SI CLAD48SI COD48SI PEA48SI EGG48SI MILK48SI SOYA48SI
WHEA48SI GRAS48SI
CAT48SI DOG48SI HDM48SI
ALTERNARIAMEANDIAMETER_10 CLADOSPORIUMMEANDIAMETER_10
p********a
发帖数: 5352
3
来自主题: Statistics版 - help for sas program
如果变量都连在一起,可用如下搞定:
data non_mis;
set spt_dloc;
if sum(of ALT48SI--HDMMEANDIAMETER_18) ne .;
run;
S***e
发帖数: 108
4
来自主题: Statistics版 - help for sas program
data mis;
set spt_dloc;
array m{36} ALT48SI CLAD48SI COD48SI PEA48SI EGG48SI MILK48SI SOYA48SI
WHEA48SI GRAS48SI
CAT48SI DOG48SI HDM48SI
ALTERNARIAMEANDIAMETER_10 CLADOSPORIUMMEANDIAMETER_10
CODMEANDIAMETER_10 PEANUTMEANDIAMETER_10 EGGMEANDIAMETER_10
MILKMEANDIAMETER_10 SOYAMEANDIAMETER_10 WHEATMEANDIAMETER_10
GRASSMEANDIAMETER_10 CATMEANDIAMETER_10 DOGMEANDIAMETER_10
HDMMEANDIAMETER_10
ALTERNARIAMEANDIAMETER_18 CLADOSPORIUMMEANDIAMETER_18
CODMEANDIAMETER_18 PEANUTMEANDIAMETER_18 EGGMEANDIAMETER
(共0页)