p***7 发帖数: 535 | 1 I have a dataset test blow
Obs Variable Method Variances tValue DF Probt
1 age Pooled Equal 1.19 16 0.2522
2 age Satterthwaite Unequal 1.19 14.672 0.2538
Now I want to delete the second observation.
data testpval;
set test;
if df=14.672 then delete;
run;
Why is it not working?
Thanks |
g**u 发帖数: 205 | 2 why don't u use
if method='Satterthwaite' then delete;
? |
p*********8 发帖数: 1039 | 3 you also can use if _N_=2 then delete
【在 p***7 的大作中提到】 : I have a dataset test blow : Obs Variable Method Variances tValue DF Probt : 1 age Pooled Equal 1.19 16 0.2522 : 2 age Satterthwaite Unequal 1.19 14.672 0.2538 : Now I want to delete the second observation. : data testpval; : set test; : if df=14.672 then delete; : run; : Why is it not working?
|
a******p 发帖数: 414 | 4 1. DF is degree, should be integer.
2. If DF=14.672, make sure if it has leading blank
【在 p***7 的大作中提到】 : I have a dataset test blow : Obs Variable Method Variances tValue DF Probt : 1 age Pooled Equal 1.19 16 0.2522 : 2 age Satterthwaite Unequal 1.19 14.672 0.2538 : Now I want to delete the second observation. : data testpval; : set test; : if df=14.672 then delete; : run; : Why is it not working?
|
s*********h 发帖数: 6288 | 5 可能只是显示了三位小数,但是实际上不止三位。
还是用_N_=2好了
【在 p***7 的大作中提到】 : I have a dataset test blow : Obs Variable Method Variances tValue DF Probt : 1 age Pooled Equal 1.19 16 0.2522 : 2 age Satterthwaite Unequal 1.19 14.672 0.2538 : Now I want to delete the second observation. : data testpval; : set test; : if df=14.672 then delete; : run; : Why is it not working?
|
b********r 发帖数: 764 | 6 SAS中非interger的这种等于判断基本都是false的
还是用_N_是正道
【在 p***7 的大作中提到】 : I have a dataset test blow : Obs Variable Method Variances tValue DF Probt : 1 age Pooled Equal 1.19 16 0.2522 : 2 age Satterthwaite Unequal 1.19 14.672 0.2538 : Now I want to delete the second observation. : data testpval; : set test; : if df=14.672 then delete; : run; : Why is it not working?
|
p***7 发帖数: 535 | 7 That is right, _n_ is more efficient. Thanks all! |