再增加三个group就行:假设 proc report 的数据集work.report 已经有4个group (group =1 label '大城市'; group =2 label '小城市'; group =3 label '普通农村'; group =4 label '贫困农村'), 现在更新下 已有proc report 的数据集 to report1, 后用proc mean:
data report1;
set report
report(in=a where=(group in (1 2)))
report(in=b where=(group in (3 4)))
report(in=c)
;
if a then group =5;
if b then group =6;
if c then group =7;
run;