cnnTest: Permutation Test for cross-type nearest neighbor distances

Description Usage Arguments Value Author(s)

View source: R/cNNTest.R

Description

Permutation Test for cross-type nearest neighbor distances

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
cnnTest(
  dist,
  n1,
  n2,
  w = rep(1, n1 + n2),
  B = 999,
  alternative = "less",
  returnSample = TRUE,
  parallel = FALSE,
  ...
)

Arguments

dist

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

n1

numbers of objects of type 1

n2

numbers of objects of type 2

w

(optional) weights of the objects (length n1+n2)

B

number of permutations to generate

alternative

alternative hypothesis ("less" to test H0:Colocalization )

returnSample

return sampled null distribution

parallel

Logical. Should we use parallel computing?

...

additional arguments for mclapply

Value

a list with the p.value, the observed weighted mean of the cNN-distances, alternative and (if returnSample) the simulated null dist

Author(s)

Fabian Scheipl


bioimagetools documentation built on July 2, 2020, 2:59 a.m.