Mantel test and partial Mantel test

The Mantel test (Mantel 1967, Mantel & Valand 1970) is a permutation test for correlation between two distance or similarity matrices. In PAST, these matrices can also be computed automatically from two sets of original data. The first matrix must be above the second matrix in the spreadsheet, and the rows be specified as two groups (with a group column). The two matrices must have the same number of rows. If they are distance or similarity matrices, they must also have the same number of columns.

The R value is simply the Pearson’s correlation coefficient between all the entries in the two matrices (because the matrices are symmetric it is only necessary to correlate the lower triangles). It ranges from -1 to +1. The permutation test compares the original R to R computed in e.g. 9999 random permutations. The reported p value is one-tailed.

In the example below, the first matrix (gpa) consists of Procrustes-fitted landmark coordinates from primate skulls, while the second matrix (seq) contains sequence data from the same primates. The user has selected the Euclidean measure for the first matrix, and Jukes-Cantor for the second. The two data sets seem to be negatively correlated (R=-0.19), and there is no significant positive correlation (the test is one-tailed). In other words, there is no correlation between morphology and genetics.

Image may contain: Text, Blue, Font, Line, Screenshot.

Partial Mantel test

It is possible to add a third matrix C below the two matrices A and B as described above. This matrix must be marked as above, and contain the same number of rows as A and B. A separate similarity measure can then be selected for this matrix. If such a third matrix is included, the program will carry out a partial Mantel test for the correlation of A and B, controlling for similarities given in C (Legendre & Legendre 1998). For the mathematical details, see the Past manual.


Legendre, P. & L. Legendre. 1998. Numerical Ecology, 2nd English ed. Elsevier, 853 pp.

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

Mantel, N. & R.S. Valand 1970. A technique of nonparametric multivariate analysis. Biometrics 26:547-558.

Published Aug. 31, 2020 8:55 PM - Last modified Aug. 31, 2020 8:55 PM