Tag: Data Manipulation

Table Look Up in SAS, practical problems

One guy asked in a SAS forum about a typical table look up problem:
He has a data with two IDs:
id1 id2
a b
a e
b c
b e
c e
d e

and he wants to generate a new data set with the following structure according to above information :
id a b …

Tweak PROC FASTCLUS for 1-Nearest Neighbor / Closest Match

In most table lookup tasks, we are doing EXACT matching. However, sometimes we are looking for closest match in the lookup table. By ‘closest’, we mean smallest Eucleadian distance:

||X-Y||2

Typically we have to manually code the search function …