# mpmcorrelogram: Multivariate Partial Mantel Correlogram In mpmcorrelogram: Multivariate Partial Mantel Correlogram

## Description

Function `mpmcorrelogram` computes both multivariate and multivariate partial Mantel correlograms. Multivariate Mantel correlograms were proposed by Sokal (1986) and Oden and Sokal (1986) and popularized among ecologists by Legendre and Legendre (1998, pp. 736-738). Multivariate partial Mantel correlograms are described and employed by Matesanz et al. (2011).

## Usage

 ```1 2 3 4 5 6 7 8``` ``` mpmcorrelogram(xdis, geodis, zdis = NULL, method = "pearson", alfa = 0.05, nclass = NULL, breaks = NULL, permutations = 999, strata, simil = FALSE, plot = TRUE, print = TRUE) ## S3 method for class 'mpmcorrelogram' plot(x, pch = c(15, 22), xlim = NULL, ylim = NULL, ylab = NULL, xlab = NULL, alfa = 0.05, ...) ```

## Arguments

 `xdis, geodis, zdis` Multivariate distance (or similarity) matrices or their as.dist representation `method` Correlation method, as accepted by cor: "pearson", "spearman" or "kendall". `alfa` Significance level for the points drawn with black symbols in the correlogram. By default `alpha` = 0.05. `nclass` Number of distance classes. Deafult `NULL` causes Sturge's law being used to determine the number of classes unless break points are provided. `breaks` Vector with break points of the distance classes. `permutations` Number of permutations for the tests of significance. `strata` An integer vector or factor specifying the strata for permutation. If supplied, observations are permuted only within the specified strata. `simil` Logical. Is the first matrix a similarity matrix? Default=`FALSE`. `plot` Logical. Should the correlogram be ploted?. `print` Logical. Should the results be printed? `x` An object of class mpmcorrelogram, i.e. resulting from function mpmcorrelogram. `pch` Vector with two integers (or two single characters) specifying the symbols (or characters) to plot respectively the significant and non-significant rM values. See points for possible values and their interpretation. `xlim` Vector with the limits for the x-axis. `ylim` Vector with the limits for the y-axis. `ylab` Label for the y-axis. `xlab` Label for the x-axis. `...` Other parameters passed to print and plot methods.

## Details

The function `mpmcorrelogram` computes both Mantel correlograms and partial Mantel correlograms. A correlogram is a graph in which spatial correlation values are plotted, on the ordinate, as a function of the geographic distance classes among the study units along the abscissa. In a "classical" Mantel correlogram, a Mantel correlation (Mantel 1967) is computed between a multivariate (e.g. multi-species or multi-locus) distance or similarity matrix and a design matrix representing each of the geographic distance classes in turn. The Mantel statistic is tested through a permutational Mantel test performed by vegan's mantel function.

In a partial Mantel correlogram, a partial correlation conditioned on a third matrix is computed between the focal matrix and the design matrix representing each of the geographic distance classes. In this case, the partial Mantel statistic is tested through a permutational test performed by vegan's mantel.partial function.

A practical application of the use of the partial Mantel correlogram can be seen in Matesanz et al. (2011).

## Value

If the arguments `plot` and `print` are both `TRUE`, `mpmcorrelogram` by default will draw a correlogram where solid squares indicate significant `rM` values and void squares indicate non-significant ones. It will also print the results as a table. In any case, `mpmcorrelogram` will return an object of `class mpmcorrelogram`, i.e. a list with the following elements:

 `breaks` Vector with the break points of the distance classes considered. `rM` Vector with the computed Mantel correlations for each distance class. `signif` The value of the selected `alfa`. `pvalues` Vector with the p-values computed for each distance class. `pval.Bonferroni` Vector with the p-values after a progressive Bonferroni correction. `clases` Alfanumeric vector with the range of each distance class.

## Acknowledgements

This package has been developed thaks to the subvention 099/RN08/02.1 of the Spanish Ministerio de Medio Ambiente, Medio Rural y Marino.

## Note

The implementation of the Mantel correlogram computation in the function `mpmcorrelogram` (and that of Mantel correlation performed by vegan's mantel.partial and mantel functions) are based on the description of Legendre and Legendre (1998). Following these approaches, positive Mantel statistics correspond to positive autocorrelation when the focal matrix (i.e. `xdis`) is a similarity matrix and to negative values when it is a distance matrix. As most of the designed tools in R for summarizing relationships between the rows of data matrices return distance objects, the argument `simil` in `mpmcorrelogram` is set by default to `FALSE`. See the examples for the use with a similarity matrix.

## Author(s)

Marcelino de la Cruz Rot marcelino.delacruz@upm.es

## References

Legendre, P. and L. Legendre. 1998. Numerical ecology, 2nd English edition. Elsevier Science BV, Amsterdam.

Mantel, N. 1967. The detection of disease clustering and a generalized regression approach. Cancer Res. 27: 209-220.

Matesanz S., Gimeno T.E., de la Cruz M., Escudero A. and Valladares F. 2011. Competition may explain the fine-scale spatial patterns and genetic structure of two co-occurring plant congeners. J. Ecol. 99: 838-848

Oden, N. L. and R. R. Sokal. 1986. Directional autocorrelation: an extension of spatial correlograms to two dimensions. Syst. Zool. 35: 608-617.

Sokal, R. R. 1986. Spatial data analysis and historical processes. 29-43 in: E. Diday et al. (eds.) Data analysis and informatics, IV. North-Holland, Amsterdam.

vegan's mantel.correlog for another implementation of (non-partial) Mantel correlograms.

## Examples

 ``` 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38``` ``` # Example from Figure 13.12 of Legendre and Legendre (1998): # Get similarity matrix based on assemblage composition. data(S) # Get euclidean distance between sites. data(D) # Compute Multivariate Mantel Correlogram # as in Fig. 13.12 of Legendre and Legendre ## Not run: result <- mpmcorrelogram(S, D, simil=TRUE) ## End(Not run) # A Multivariate Partial examle. # Get distance matrix of "covariate" attributes data(Zd) # Compute multivariate partial Mantel correlogram ## Not run: result <- mpmcorrelogram(S, D, Zd, simil=TRUE) ## End(Not run) # Change the appearance of the plot ## Not run: plot(result, pch=c(17,24)) ## End(Not run) ```

### Example output   ```Loading required package: vegan
This is vegan 2.5-4
evaluating distance class 1, 2, 3, 4, 5, 6,

class  distance.range         rM     p p.Bonferroni
1     1  0.12  -  0.267  0.5384651 0.001        0.001
2     2 0.267  -  0.413  0.4200693 0.001        0.002
3     3  0.413  -  0.56  0.1029263 0.233        0.699
4     4  0.56  -  0.707 -0.3087466 0.021        0.084
5     5 0.707  -  0.853 -0.4010639 0.005        0.025
6     6     0.853  -  2 -0.4262626 0.001        0.006

evaluating distance class 1, 2, 3, 4, 5, 6,

class  distance.range          rM     p p.Bonferroni
1     1  0.12  -  0.267  0.06626292 0.337        0.337
2     2 0.267  -  0.413  0.52481294 0.001        0.002
3     3  0.413  -  0.56  0.31878713 0.014        0.042
4     4  0.56  -  0.707 -0.25568078 0.066        0.264
5     5 0.707  -  0.853 -0.32226995 0.013        0.065
6     6     0.853  -  2 -0.42087234 0.001        0.006
```

mpmcorrelogram documentation built on May 1, 2019, 10:17 p.m.