cnnTest: Permutation Test for cross-type nearest neighbor distances

View source: R/cNNTest.R

cnnTestR Documentation

Permutation Test for cross-type nearest neighbor distances

Description

Permutation Test for cross-type nearest neighbor distances

Usage

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


bioimaginggroup/bioimagetools documentation built on June 2, 2022, 3:49 p.m.