I am looking to test whether several continuous environmental environmental might influence bacterial community composition in soil samples.

A total of 50 soil samples were collected, but in a blocked manner (10 blocks of 5), such that the samples within a block were all fairly close together. e.g. the first 15 are drawn below. I've labelled the blocks A, B, C etc.

enter image description here

I have a table showing site, by abundance of bacterial species, and have used this to produce a Bray-Curtis dissimilarity matrix.

My environmental measurements were taken from all of the 50 soil samples.

As stated, my aim is to test whether changes in the community composition are related to changes in these environmental variables. So far, I've used the adonis function from the R package vegan to try and test this - adonis is essentially permanova.

adonis(bray_curtis_dissmilarity ~ env1 + env2 + env3)

My concern is that both the bacterial communities and environmental variables might be spatially auto-correlated (i.e. samples close together might be more similar than samples further apart, irrespective of the effects of the environmental variables). This might be exacerbated by the blocked sampling design. I do know the distance (in cm) between each sample, so could potentially partial out the spatial distance, but I'm not sure if this is possible.

Is there a better way to analyse this data, or a way to modify the adonis analysis? I've seen various types of ordination method (cca, rda, envfit etc), but am not sure which if any of these deal with spatial autocorrelation.

  • $\begingroup$ How about first looking at whether there is a spatial component affecting community composition. Add a term for Sample Block to the model and see whether or not it has negligible effect. $\endgroup$ Nov 8, 2020 at 16:17
  • $\begingroup$ @abstrusiosity Thanks - I've done an exploratory NMDS of the community compositions, using the Bray-Curtis dissimilarity matrix, and the blocks are noticeable as clusters. I don't know if the same is true if I did the same for environmental variables, I'll try it. $\endgroup$
    – rw2
    Nov 8, 2020 at 16:43
  • $\begingroup$ If the local similarity is driven by the environment variables then your model is fine as is. The potential problem is that there is some unmeasured variable driving differences. You can check that by adding the Block term to your linear model. $\endgroup$ Nov 8, 2020 at 17:06
  • $\begingroup$ But couldn't spatial distance account for both the environmental and community differences - shouldn't I try to remove it's effects somehow? $\endgroup$
    – rw2
    Nov 8, 2020 at 20:15
  • $\begingroup$ @rw2 any progress with this? I have a similar question for a forested system $\endgroup$ Jan 10, 2023 at 22:09

1 Answer 1


There is a better way to analyze this data, yes. I haven't personally done it myself, but I know someone who has. I recommend reading their work to get an idea of how it works and if helps you


de Souza, J. S., dos Santos, L. N., & dos Santos, A. F. (2018). Habitat features not water variables explain most of fish assemblages use of sandy beaches in a Brazilian eutrophic bay. Estuarine, Coastal and Shelf Science, 211, 100-109.

  • $\begingroup$ Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center. $\endgroup$
    – Community Bot
    Mar 27, 2023 at 2:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.