The following links may help navigating this page
No Feed Found
No Feed Found

SAS - Large Values · 2008-02-12

Do you know SAS, the business intelligence tool with the 60ies-charmes? If the day comes, when you need to find the first and second largest value from a set of observations, here is how it'd work:

proc summary data=&inputdataset.;
   var &variable.;
   class &class_list.;
   output
      out=&output_dataset.
      sum=idgroup(max(&variable.) out[2] (&variable.)=)
      /autolabel autoname;
run;

Somehow idgroup and out[2] do the trick. Why it works and what else to look after can be found in "Getting the Most from PROC MEANS" by Andrew H. Karp.


Commenting is closed for this article.