iterative algorithm that uses the 1D center of mass of a
horizontal and a vertical line through a starting point
startPosition (defaults to the center of the data array
dataA) for finding the 2D center of mass.
Note that this algorithm works only for continuous,
Gaussian-type gray value distributions - small hot spots might
go unnoticed.
returns the (C)orrelation of (P)ure (C)olumn (A)verages for the two 2d
matrices M1 and M2 using the function given in correlationFunction
for computing the correlation coefficient.
returns Mantel`s r statistics for matrix correlation for the two arrays
M1 and M2. If symmetric is true, only the lower triangular elements
are considered.
Works with both (n x m) matrices and 1d arrays (for which it
is essentially equivalent to the correlation function).
See Mantel 1997: Randomization, Bootstrap and Monte Carlo Methods in
Biology, Chapman&Hall, p. 174.
Mantel`s Z statistics for
- two (symmetric) distance matices
(equivalent to the Hadamard product for symmetric matrices).
- two 1d arrays
M1 and M2 are required to have the same shape.
n_i: size of group i
d_ij: proximity of sites i and j
omega(i),``omega(j)``: binary indicator functions for group membership
of sites i and j, respectively
M1 is a symmetric n x n matrix of proximities
M2 is a n x n symmetric binary matrix indicating group membership
(= values of the omega function above. n groups in total)