Permutation Test for cross-type nearest neighbor distances
cnnTest(
dist,
n1,
n2,
w = rep(1, n1 + n2),
B = 999,
alternative = "less",
returnSample = TRUE,
parallel = FALSE,
...
)
a distance matrix, the upper n1 x n1 part contains distances between objects of type 1 the lower n2 x n2 part contains distances between objects of type 2
numbers of objects of type 1
numbers of objects of type 2
(optional) weights of the objects (length n1+n2)
number of permutations to generate
alternative hypothesis ("less" to test H0:Colocalization )
return sampled null distribution
Logical. Should we use parallel computing?
additional arguments for mclapply
a list with the p.value, the observed weighted mean of the cNN-distances, alternative and (if returnSample) the simulated null dist