Probability of observing the ith nearest neighbour at the same distance or larger as the (i-1)th nearest neighbour
This function gives the probability of observing the ith nearest neighbour distance larger or equal to c, and the (i-1)th nearest neighbour at distance c, $P(d_i >= c, d_(i-1) = c)$.
numeric, which nearest neighbour to consider
vector, the distance at which the ith NN was observed
numeric, size of the dataset
The probability is calculated by ranking the data and assuming that the data lie on a torus. For details see Dümcke et al. "A novel test for independence derived from an exact distribution of ith nearest neighbours" (manuscript in preparation)
Sebastian Dümcke email@example.com
Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.