This function gives the probability of observing the ith nearest neighbour at a distance greater or equal to c and the (i-1)th nearest neighbour at distance a $P(d_i >= c, d_(i-1) = a)$
1 |
i |
numeric, which nearest neighbour to consider |
c |
vector, the distance at which the ith NN was observed |
a |
vector, the distance at which the ith NN was observed. |
k |
vector, number of previous NNs at distance a |
N |
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)
Probability vector, entries with value -1 if the probability does not exist
Sebastian Dümcke duemcke@mpipz.mpg.de
P_ceq
, Pc_givena
1 |
Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.
All documentation is copyright its authors; we didn't write any of that.