Running a Mantel test with XLSTAT

Dataset for Mantel test XLS40.5 KB

Tutorial video
  • Pro Core statistical software

  • System configuration

    • Windows:
      • Versions: 9x/Me/NT/2000/XP/Vista/Win 7
      • Excel: 97 and later
      • Processor: 32 or 64 bits
      • Hard disk: 150 Mb
    • Mac OS X:
      • OS: OS X
      • Excel: X, 2004 and 2011
      • Hard disk: 150Mb.

Benefits

  • Easy and user-friendly
    Easy and user-friendly XLSTAT is flawlessly integrated with Microsoft Excel which is the most popular spreadsheet worldwide. This integration makes it one of the simplest available tools to work with as it utilizes the same philosophy as Microsoft Excel. The program is accessible in a dedicated XLSTAT tab. The analyses are grouped into functional menus. The dialog boxes are user-friendly and setting up an analysis is straightforward.
  • Data and results shared seamlessly
    Data and results shared seamlessly One of the greatest advantages of XLSTAT is the way you can share data and results seamlessly. As the results are stored in Microsoft Excel, anyone can access them. There is no need for the receiver to have an XLSTAT license or any additional viewer which makes your team-work easier and more affordable. In addition, results are easily integrable into other Microsoft Office software such as PowerPoint, so that you can create striking presentation in minutes.
  • Modular
    Modular XLSTAT is a modular product. XLSTAT-Pro is a core statistical module of XLSTAT which includes all the mainstream functionalities in statistics and multivariate analysis. More advanced features contained in add-on modules can be added for specific applications. This way you can adapt the software to your needs making the software more cost-efficient.
  • Didactic
    Didactic The results of XLSTAT are organized by analysis and are easy to navigate. Moreover useful information is provided along with the results to assist you in your interpretation.
  • Affordable
    Affordable XLSTAT is a complete and modular analytical solution that can suit any analytical business needs. It is very reasonably priced so that the return of your investment is almost immediate. Any XLSTAT license comes with top level support and assistance.
  • Accessible - Available in many languages
    Accessible - Available in many languages We have ensured XLSTAT is accessible to everyone by making the program available in many languages, including Chinese, English, French, German, Italian, Japanese, Polish, Portuguese and Spanish.
  • Automatable and customizable
    Automatable and customizable Most of the statistical functions available in XLSTAT can be called directly from the Visual Basic window of Microsoft Excel. They can be modified and integrated to more code to fit to the specificity of your domain. Adding tables and plots as well as modifying existing outputs becomes easy. Furthermore, XLSTAT includes some special tools on the dialog boxes to generate automatically the VBA code in order to reproduce your analysis using the VBA editor or to simply load pre-set settings. This effortless automation of routine analysis will be a huge time saver on your part.

Mantel test

The Mantel test is useful to compute and test the linear correlation between two proximity matrices (dissimilarity or similarity). It is often used in Ecology to test if the dissimilarities between several sites, in terms abundancy of species on one side, and in terms of geophysical characteristics on the other side, can be related or not. Our example is in the field of genetics of populations.

Dataset for running a Mantel test

An MS Excel sheet with both the data and the results can be downloaded by clicking here.

The data used in this tutorial correspond to a study where the researchers want to determine if the genetic distance between populations of insects in different regions of Africa is related to the geographical distance. The genetic distance is measured as a difference in gene frequencies among the various populations (there is only one gene of interest here). The geographical distance is based on distance in kilometers between the regions of interest, as well as on climatic distance.

Setting up a Mantel test

To activate the Mantel test dialog box, start XLSTAT, then select the XLSTAT / Mantel test command, or click on the corresponding button of the XLSTAT toolbar (see below).

barmantel.gif

Once you have clicked on the button, the dialog box appears. Then select the data corresponding the first dissimilarity matrix (A), and the data corresponding to the second dissimilarity matrix (B).

As the rows and columns labels of the matrices have been selected, we leave the Labels included option selected.

mantel1.gif

In the Options tab we choose the two-tailed (r<>0) option in order to compute a two-tailed p-value.

The Exact p-value option is left activated. However, as the dimension of the matrices is too high (the limit is 4x4), the exact p-value won't be computed, and 10000 random permutations will be used to compute an estimated p-value.

mantel11.gif

After you have clicked on the OK button, the computations start and the results are displayed on a new Excel sheet.

Interpreting the results of a Mantel test

The first result allows to visually verify if there is somehow a correlation between the proximities of the two matrices.

mantel2.gif

The next table gives the Mantel r statistic, and the corresponding two-tailed p-value, obtained from the 10000 permutations. We can see here that as the conclusion confirms it, we should reject the null hypothesis that there is no correlation between the matrices. As a conclusion, we can consider that the the genetic and geographic distances are correlated.

mantel3.gif

A chart shows the distribution from which the p-value has been obtained.

mantel4.gif