各位大佬好,我写了一个条件语句,但是得出来的结果是错的,不知道哪里出了问题,请大家指点
data a3;
set work.a2;
if xb=1 | bmi>=25 | yw>=85 then q=1;
if xb=1 | bmi>=25 | yw<85 then q=1;
if xb=1 | bmi<25 | yw<85 then q=0;
if xb=1 | bmi<25 | yw>=85 then q=1;
if xb=2 | bmi>=25 | yw<80 then q=1;
if xb=2 | bmi>=25 | yw>=80 then q=1;
if xb=2 | bmi<25 | yw<80 then q=0;
if xb=2 | bmi<25 | yw>=85 then q=1;
run;
data a3;
set work.a3;
proc print;
run;
上面是我写的,但是我得出来的p值都是1,不知道是为啥