nndist: Determine nearest neighbors based on maximum distance
Description
nndist determines the nearest
neighbors for a set of observations within a certain
radius.
Usage
nndist(d, ubd)
Value
Returns the indices of the nearest neighbors as a
list.
Arguments
d
An \(n\times n\) square distance matrix
containing the intercentroid distance between the
\(n\) region centroids.
ubd
A proportion in (0, 1]. The distance of
potential clusters must be no more than ubd * m,
where m is the maximum intercentroid distance
between all coordinates.
Author
Joshua French
Details
This function determines the nearest neighbors of each
centroid based on the intercentroid distance. The number
of nearest neighbors is limited by the furthest distance
between the starting centroid and the farthest neighbor.