H**********1 发帖数: 3056 | 1 I want to select all the 40 variables from data set
but, I want to delete all the missing value for any of the variable.
how to do this?
I don't want to use 4O TIMES "if VAR1 IS NOT MISSING OR...."
THANKS! |
H**********1 发帖数: 3056 | 2 I am working on PROC IML
FOR MEDIAN. However, how to deal the missing values in almost all of the
variables.
thanks |
p*******r 发帖数: 1951 | 3 用个array
...
totalmissing = 0;
array countmissing(40) _all_;
do i=1 to 40;
if missing(countmissing(i)) = 1 then totalmissing + 1;
end;
if totalmissing > 0 then delete;
...
【在 H**********1 的大作中提到】![](/moin_static193/solenoid/img/up.png) : I want to select all the 40 variables from data set : but, I want to delete all the missing value for any of the variable. : how to do this? : I don't want to use 4O TIMES "if VAR1 IS NOT MISSING OR...." : THANKS!
|
H**********1 发帖数: 3056 | 4 thanks, it was said the median function will ignore the missing value, but i
did get error due to the missing.
the array will delete the total column ?
thanks!
【在 p*******r 的大作中提到】![](/moin_static193/solenoid/img/up.png) : 用个array : ... : totalmissing = 0; : array countmissing(40) _all_; : do i=1 to 40; : if missing(countmissing(i)) = 1 then totalmissing + 1; : end; : if totalmissing > 0 then delete; : ... :
|
p*******r 发帖数: 1951 | 5 不是删column, 这个是把所有有missing value的row 都删除。
i
【在 H**********1 的大作中提到】![](/moin_static193/solenoid/img/up.png) : thanks, it was said the median function will ignore the missing value, but i : did get error due to the missing. : the array will delete the total column ? : thanks!
|
H**********1 发帖数: 3056 | 6 then, it will delete no-missing values of other variable, right?
【在 p*******r 的大作中提到】![](/moin_static193/solenoid/img/up.png) : 不是删column, 这个是把所有有missing value的row 都删除。 : : i
|
w*******n 发帖数: 469 | 7 if nmiss(of _numeric_) or cmiss( of _character_) then delete; |
t*******t 发帖数: 633 | 8 这个我真要试试。
我之前一直是写macro来做imputation的
【在 w*******n 的大作中提到】![](/moin_static193/solenoid/img/up.png) : if nmiss(of _numeric_) or cmiss( of _character_) then delete;
|
H**********1 发帖数: 3056 | 9 wow, this maybe the answer, thanks!
【在 w*******n 的大作中提到】![](/moin_static193/solenoid/img/up.png) : if nmiss(of _numeric_) or cmiss( of _character_) then delete;
|