P_cge_aeq: Probability of observing the ith nearest neighbour at a...

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/P_cge_aeq.R

Description

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)$

Usage

1
P_cge_aeq(i, c, a, k, N)

Arguments

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. a <= c

k

vector, number of previous NNs at distance a

N

numeric, size of the dataset

Details

The probability is calculated by ranking the data and assuming that the data lie on a torus. For details see D<c3><bc>mcke et al. "A novel test for independence derived from an exact distribution of ith nearest neighbours" (manuscript in preparation)

Value

Probability vector, entries with value -1 if the probability does not exist

Author(s)

Sebastian D<c3><bc>mcke duemcke@mpipz.mpg.de

See Also

P_ceq, Pc_givena

Examples

1
P_cge_aeq(10,4:8,2:6,rep(1,5),30)

knnIndep documentation built on May 19, 2017, 2:10 p.m.

Search within the knnIndep package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs in the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.