Saturday, April 04, 2009

select top N observations in a data set

Choose top N observations in each group:
A typical Data, not sorted:

1. Die Hard Data Step guy (not the most efficient algorithm, but easy to code)

2. PROC UNIVARIATE solution

(provided by "./ ADD NAME=Data _null_" & "Chang Chun" on SAS-L Archive)