That won't directly provide all the critical points for the box plot. (e.g. the ends of the whiskers are not the min/max of the whole data set). I think this will do it. Please let me know if you think this is accurate: data have; set sashelp.class; run; proc means data=have nway noprint; class sex; var weight; output out=stat min= max= median= mean= p25= p75= n=/autoname; run; data stat; set stat; upgate=weight_p75+1.5*(weight_p75-weight_p25); downgate=weight_p75-1.5*(weight_p75-weight_p25); run; proc sql; create table have2 as select a.* from have a INNER JOIN stat b on a.sex = b.sex where a.weight between downgate and upgate ; quit; proc means data=have2 nway; class sex; var weight; output out=out_wisk min=wisk_min max=wisk_max n=/autoname; run; proc sql; select a.sex, b.wisk_min, a.weight_p25, a.weight_median, a.weight_mean, a.weight_p75, b.wisk_max from stat a INNER JOIN out_wisk b on a.sex = b.sex ; quit;
... View more