Ties in Nearest Neighbor Distances
When identifying a set of nearest neighbors in a point dataset, it is possible that the kth neighboring point and one or more additional points will be equidistant from the focal point (ego). SpaceStat handles these ties by assigning fractional weights to the set of points (S) which are equidistant from ego.
Specifically, if we want the k nearest neighbors around ego, in the case of tied distances we first identify a+d points, where d is the size of the set of S, the group of points that are equidistant from ego that contains the kth nearest neighbor, and a is the number of points before the first member of S. So the group of weights that would be included in calculations for ego is w0, w1, ..., wa, wa+1, ..., wk, ..., wa+d, where wi = 1 for i values from 0 to a, and wi = (k-a)/d for values of w from a+1 to a+d. Note that a can equal 0.