1. Use proc rank to output not only the rank (or bucket) of each observation, but also the minimum and maximum values of that rank (or bucket)? For instance,
rank 0 has a minimum value of 1 and a maximum value of 10
rank 1 has a minimum value of 11 and a maximum value of 19
...
rank n has a minimum value of x and a maximum value of y
What happens when the item in dataset 2 has a value of 10.5? More generally, the ranks/buckets created from data set one won't come out so nice and clean as your example, it might be more along the lines of rank 0 has a minimum value of 1 and a maximum value of 7 rank 1 has a minimum value of 14 and a maximum value of 23 Now what do you do when you get a value of 10? I think your entire concept is flawed, as empirical buckets don't have hard and fast upper and lower limits, they have empirical limits, as I have described, and will result in problems if you try to apply this to a 2nd data set. The idea of creating buckets from continuous variables is also a flawed idea, in my opinion, and you might want to re-think what you are doing with this data. If you explain the long-term analysis goal, as well as what the data is, we might be able to propose more meaningful analysis techniques.
... View more