I have two community data sets (samples as rows, species as columns, populated with abundance). This data comes from two habitats/sites, with differing numbers of samples at each site.

What I want to do is test the hypothesis that species that tend to co-occur at the first site also tend to co-occur in the second site and whether species that tend to avoid each other in one site also tend to avoid each other in the second site. What is the best way to test this?

My first thought is to do something like a Mantel test where my two matrices are some type of pairwise species co-occurrence index like c-scores or a covariance matrix containing the covariance of each species pair, one for each site. Would this work?

I also considered doing something like ANOSIM or PERMANOVA, but I don't actually want to test if the two sites are different, just if the underlying correlations/co-occurrences between species are the same.

To add some data to this, let's use the first 10 species of the mite data in vegan.


The microtopograhpy in the environmental data is a factor with two levels, "Blanket" and "Hummock." For this example we are interested in the wether these two topographies have the same species associations.

If we look at the data in an NMDS plot, we see that the two topographies do have different mite communities.

enter image description here

However, that's not really what I am asking, but instead want to know if they have the same species associations (i.e. are species whose abundances are positively correlated in one of the topographies also positively correlated in the second?).

So my first thought here is to generate a correlation or covariance matrix for each of the topographies.


enter image description hereenter image description here

Now, if there was no issue of lack of independence, I would then run a correlation test on the two correlation matrices to test whether species that are correlated in topography 1 are also correlated in topography 2 enter image description here

However, I think this would be invalid and am wondering if I could instead run something like a mantel test to examine this.

  • 1
    $\begingroup$ Could you show us your data, or some plots? $\endgroup$ – kjetil b halvorsen Dec 29 '18 at 21:46
  • $\begingroup$ I have added some sample data and plots to further illustrate my thinking. $\endgroup$ – Cody K Dec 31 '18 at 15:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.