如果输入数据为temp1,
proc format;
value inte 0-2 ='0-2'
3-5='3-5'
6-8='6-8'
9-11='9-11'
12-high ='12+'
;
data temp2;
set temp1;
b=put(a,inte.);
run;
proc sort data=temp2 out=temp3;
by b;
run;
proc means data=temp3 ;
var a;
by b;
output out=temp5 median=median;
run;