SAS macro contigclust: Contiguity-Constrained Hierarchical Agglomerative Clustering Using SAS. Hierarchical clustering is one of the most basic methods for partitioning a set of objects into clusters of similar objects. In standard clustering analysis, every pair of objects or clusters is eligible to be joined during each iteration of the clustering algorithm. However, there are circumstances under which it would be preferable to limit this eligibility. One obvious situation is when the objects of interest are geographical regions which should only be allowed to merge when they are contiguous. The goal here is to demonstrate a SAS macro that will perform the agglomerative version of hierarchical clustering while providing the user with an intuitive means of imposing a contiguity constraint.