data vitals;
input ID : #3.
Age
Pulse
SBP
DBP;
label SBP = "Systolic Blood Pressure"
DBP = "Diastolic Blood Pressure";
datalines;
001 23 68 120 80
002 55 72 188 96
003 78 82 200 100
004 18 58 110 70
005 43 52 120 82
006 37 74 150 98
007 . 82 140 100
;
if missing(age) then delete;
if age lt 50 then do;
if pulse lt 70 then pulsegroup='Low';
else pulsegroup='High';
if sbp lt 130 then sbpgroup='Low';
else sbpgroup='High';
end;
else if age ge 50 then do;
if pulse lt 74 then pulsegroup='Low';
else pulsegroup='High';
if sbp lt 140 then sbpgroup='Low';
else ssbpgroup='High';
end;
run;
proc print data=vitals;
run;
运行结果显示一堆这样的错误:319 end;
---
180
ERROR 180-322: 语句无效或未按正确顺序使用。
是不是if和end的使用不当,正确的用法是什么呢?望路过的大神指点迷津,谢谢啦!



雷达卡




京公网安备 11010802022788号







