wmat: an optional third matrix of similarities to calculate a Mantel cross-correlograms.
increment: increment for the uniformly distributed distance classes.
resamp: the number of permutations under the null to assess level of significance.
quiet: If TRUE, the counter is suppressed during execution.
Returns
An object of class "correlog" is returned, consisting of the following components: - correlation: the value for the Moran (or Mantel) similarity.
mean.of.class: the actual average of the distances within each distance class.
nlok: the number of pairs within each distance class.
x.intercept: the interpolate x.intercept of Epperson (1993).
p: the permutation two-sided p-value for each distance-class.
corr0: If a cross-correlogram is calculated, corr0 gives the empirical cross-correlation at distance zero.
Details
The function calculates Mantel (cross-)correlograms at discrete distance classes from two (or three) matrixes. The first is the matrix of distances and the second is a matrix of similarities. The optional third matrix is an additional similarity matrix to be used to calculate a Mantel cross-correlogram. Missing values are allowed -- values are assumed missing at random.
Examples
# first generate some sample datax <- expand.grid(1:20,1:5)[,1]y <- expand.grid(1:20,1:5)[,2]# z data from an exponential random fieldz <- cbind( rmvn.spa(x = x, y = y, p =2, method ="exp"), rmvn.spa(x = x, y = y, p =2, method ="exp"))# w data from a gaussian random fieldw <- cbind(rmvn.spa( x = x, y = y, p =2, method ="gaus"), rmvn.spa(x = x, y = y, p =2, method ="gaus"))# Make distance and similarity matriceszmat <- cor(t(z))wmat <- cor(t(w))dmat <- sqrt(outer(x, x,"-")^2+ outer(y, y,"-")^2)# Mantel correlogram fit1 <- mantel.correlog(dmat = dmat, zmat = zmat, increment =2, quiet =TRUE, resamp =0)## Not run: plot(fit1)# Mantel cross-correlogram fit2 <- mantel.correlog(dmat = dmat, zmat = zmat, wmat = wmat, increment =2, quiet =TRUE, resamp =0)## Not run: plot(fit2)