Spatial Analysis: Mantel's Test
A central goal in ecology is to explain the distribution of a given species in terms of environmental variables presumed to be the operative constraints on the species. This goal, for example, underlies much of classical gradient analysis, niche theory, and some of biogeography. But this goal is confounded by two fundamental issues. First, environmental variables are intercorrelated among themselves, and so it may be difficult to ascribe causal mechanism to a variable even if it can be shown to be correlated with species distribution. Secondly, environmental variables have a characteristic spatial grain (autocorrelation), and so their influence is likely to be expressed only at particular scales of reference. These issues are in addition to the likelihood that the species itself may exhibit autocorrelation in its distribution.
In conventional statistical analyses, the former problem is addressed via multivariate methods that allow one to attend the correlations among predictor variables; partial regression is a familiar solution to this problem. Path analysis is an interpretative approach that allows one to conceptually separate causal relationships from spurious relationships engendered by coincidental correlations among variables. But conventional parametric approaches are confounded by the second issue, namely that autocorrelation in the variables violates the assumptions of parametric analysis.
Mantel's (1967) test is an approach that overcomes some of the problems inherent in explaining species-environment relationships (Legendre and Fortin 1989).
Mantel's test is a regression in which the variables are themselves distance or dissimilarity matrices summarizing pairwise similarities among sample locations.
For example, instead of "abundance of species X on plot i" the dependent variable might be "similarity of basal area of species X on plots i and j." Similarly, the predictor variable might be "similarity of soil type" between samples instead of "soil type" for a single sample. The operative question is, "Do samples that are similar in terms of the predictor (environmental) variables also tend to be similar in terms of the dependent (species) variable?" One important case that Mantel's test considers explicitly is the case where the predictor variable is space itself, measured as geographic location (e.g., as (x,y) coordinates). In this case, the question is "Are samples that are close together also compositionally similar?" Reciprocally, "Are samples that are spatially removed (or environmentally dissimilar) from each other also compositionally dissimilar?"
In fact, the power and versatility of Mantel's test stems from the various ways that the distance matrices or the regression itself can be framed.
One advantage of Mantel's test is that, because it proceeds from a distance (dissimilarity) matrix, it can be applied to variables of different logical type (categorical, rank, or interval-scale data). This is especially fortunate for ecologists, who often find themselves working with categorical variables (e.g., soil type); converting these to distance (dissimilarity) metrics also makes the metrics better variables for use in regression.
All that matters is that an appropriate distance metric be employed (see
Orloci 1978 or others for a review of distance metrics).
These metrics, likewise, can be univariate (e.g., "similarity in maple abundance") or multivariate (e.g., using Sorenson's, Jaccard's, or other index of species similarity).
Note that because dissimilarity (ecological distance) typically is equivalent to the inverse of similarity (D=1-S), using similarity (or closeness) instead of dissimilarity (distance) has no qualitative effect on the analysis: it merely changes the sign of the coefficients.
Mantel's statistic is based on a simple cross-product term:
and is normalized:
where x and y are variables (or sets of variables) measured at locations i and j and n is the number of elements in the distance matrices (= m(m-1)/2 for m sample locations), and the sx and sy are standard deviations for variable x and y. This standardized equation allows one to consider variables of different measurement units within the same framework.
Because the elements of a distance matrix are not independent, Mantel's test of significance is evaluated via permutation procedures, in which the rows and/or columns of the distance matrices are randomly rearranged. Mantel statistics are recomputed for these permuted matrices, and the distribution of values for the statistic is generated via many iterations (~1000 for alpha=0.05, ~5000 for alpha=0.01, ~10,000 for greater precision; Manly 1991).
Note that the Mantel test is based on linear correlation and hence is subject to the same assumptions that beset a common Pearson correlation (i.e., nonlinear relationships between variables may be degraded or lost in the linear correlation). Moreover, the test of spatial dependence is averaged over all distances in the simple Mantel's test, and so this test cannot discover changes in the pattern of correlation at different distances (scales). The Mantel correlogram (below) overcomes this problem, albeit at extra computational expense.
Mantel's Tests: Cases
Because Mantel's test is merely a regression on distance matrices and the distance matrices can be variously defined, the test can assume a variety of forms as special cases. These are, in fact, variants of the same case but are interpreted somewhat differently. There are at least six variants
(Legendre and Fortin 1989).
Thus, the flexibility of Mantel's test provides for a wide range of reasonably explicit hypothesis tests. The onus is on the investigator to pose these hypotheses and interpret the analysis in a meaningful way.
- Case 1. Simple Mantel's Test on Geographic Distance.
- If the dependent distance matrix is species similarity and the predictor matrix is geographic distance ("space itself"), the research question is "Are samples that are close together also compositionally similar?" This is equivalent to testing for overall autocorrelation in the dependent matrix (i.e., averaged over all distances).
- Case 2. Simple Mantel's Test on a Predictor Matrix.
- If the dependent matrix is again species similarity and the predictor matrix is a dissimilarity matrix based on a set of environmental variables, then the simple test is for correlation between the two matrices. Such correlation would indicate that locations that are similar environmentally tend to be similar compositionally. This, of course, is one of the fundamental questions in ecology.
- Case 3. Simple Mantel's Test between an Observed Matrix and One Posed by a Model.
- As a formal hypothesis test, Mantel's test can be used to compare an observed dissimilarity matrix to one posed by a conceptual or numerical model. Here, the model is provided as a "user-provided" matrix of similarities or distances, and the test is to summarize the strength of the correspondence between the two matrices. The model distance matrix might be provided as a simple binary matrix of 0's and 1's; alternatively, distances might be based on a more complicated model.
A simple example of a Mantel's test using a model matrix would be a case where the samples are each assigned to a group (e.g., community type) and the predictor variables are measured environmental variables.
The question is, are samples in the same group (community type) also similar in terms of the environmental variables?
In this case two samples are similar (distance=0) if they are both assigned to the same group, otherwise they are dissimilar (distance=1).
A simple Mantel's using this matrix tests group means by comparing among- to within-group dissimilaries.
- Case 4. The Mantel Correlogram.
- A special case of the above is to provide a series of "model" adjacencies that correspond to membership within a specific distance class. That is, the first distance matrix is "turned on" for all pairs of points within the first distance class; the second matrix is scored for all pairs of points within the second distance interval, and so on. The result of this special-case analysis is a Mantel's correlogram, completely analogous to an autocorrelation function but performed on a distance matrix. An appealing feature of a Mantel correlogram is that it may be multivariate.
- Case 5. Partial Mantel's Test on Three Distance Matrices.
- The idealized case of Mantel's test is a partial regression on three distance matrices: species (dis)similarity, environmental (dis)similarity, and geographic location (pure distance).
Here, the research questions are, "How much of the variability in species composition is explained by the environmental matrix?" and "Is there residual variability in species composition that is spatially structured, after removing the effects of the environmental variables?" The analysis in this case is partial regression, and both partial correlation (or regression) coefficients are of interest: rYX|S and rYS|X where Y is the dependent matrix (species similarity), X is the predictor matrix (environmental variables), and S is space itself.
- Case 6. Partial Mantel's on Multiple Predictor Variables.
- Often, knowing that the environment has some relationship with the dependent variable of interest is not sufficiently satisfying: we wish to know which variables are actually related to the dependent variable. The logical extension of Mantel's test is toward multiple regression, in which the predictor variables are entered into the analysis as individual distance matrices (Smouse et al. 1986, Manly 1991). As a partial regression technique, Mantel's test provides not only an overall test for the relationships among distance matrices, but also tests the contribution of each predictor variable for its "pure partial" effect on the dependent variable. If geographic location is included as one of the predictor matrices, then the test returns the pure partials for "space itself" as well as the partials for each of the predictor variables.
Presentation and Interpretation
By convention, Mantel's test is presented in the framework of path analysis. In this, the underlying conceptual hypothesis is made explicit: space "causes" environmental variation, environmental variables may "cause" species distribution, and there may be residual spatial variation in the species that is not accounted by the measured environmental variables ("pure spatial" residuals). In fact, these spatial residuals are unaccountable and as such are thus fodder for further study.
[Path analysis is, of course, a matter of interpretation and it has been used and abused in ecological applications (Petraitis et al. 1996). Because path analysis is based on correlation, finding a significant correlation between two variables actually cannot indicate cause; yet the converse is true: failing to find a correlation between two variables certainly argues against a causal relationship. Thus, conservatively interpreted, path analysis provides a useful framework for the interpretation of partial regression such as in Mantel's test.]
This same information is often presented in tabular form, in which the tabled matrix is split at the diagonal into simple and partial correlations
(Legendre and Fortin 1989). The matrix representation of a Mantel's test for three environmental variables would take the form:
where the upper-diagonal elements are simple correlations and the lower-diagonal elements are partials. In practice, one would table the coefficients as well as their significance levels (p values). A predictor might have a high simple correlation but a much lower (even nonsignificant) partial if it was itself correlated with another predictor variable (a spurious correlation in path analysis), while a variable that maintained a high value even as a partial would be interpreted as a causal factor (note well that this is termed "causal" for interpretation--correlation cannot ascribe causality under any circumstances).
In the case of multiple predictor matrices, the path diagrams and corresponding tables can get a bit more cumbersome, but the idea is the same. An analysis with five independent predictor matrices plus space itself, presented as a path diagram, might appear like this:
The corresponding table of coefficients would be a large matrix (Species Y, X1-X5, and S = space), but includes much more information than can be illustrated easily in a path diagram.
In particular, we are interested in the simple Mantel correlations between space and each variable, and the correlations between each environmental variable and the species.
We are also interested in the partial correlations between each environmental variable and the species, controlling for spatial autocorrelation (i.e., the partials rYX|S).
To gauge the relative importance of the predictors, we may be interested in the partials between each environmental variable and the species, controlling for all other variables including space (i.e., the partials rYX|*, which are the pure partials for each predictor).
Finally, we are interested in any pure spatial residuals after the environmental variables have been accounted (rYS|*).
These spatial residuals include the effects of any unmeasured environmental variables, as well as any pure spatial process such as seed dispersal.
In table format these coefficients can be represented in four columns:
||rElev Y | Space
||rElev Y | *
||rSun Y | Space
||rSun Y | *
||rTCI Y | Space
||rTCI Y | *
||rAWC Y | Space
||rAWC Y | *
||rpH Y | Space
||rpH Y | *
||rY Space | *
This table includes a great deal more information than can be
displayed conveniently in a path diagram. Importantly, the
third column of the table summarizes the partials
between each environmental variable and the species (Y,
controlling for spatial autocorrelation. The fourth column
summarizes the pure partials for each environmental variable,
controlling for space and every other variable in the model.
This table represents a large number of Mantel's tests--simple as well
as partial--but captures the information needed to address the
research question at hand, concerning the relationships among
environmental similarity, spatial proximity, and ecological
Back to ST 733 Home Page