Adonis: proper permutations scheme for repeated measurements

I'm using adonis to analyze the effects of various variables on beta diversity, but the design of the study involves repeated measures.
Basically, I have 16s samples from mothers from urban or rural environments taken at two timepoints, one within 3 months from pregnancy, the other one year later.
I also have other variables like BMI, age, the precise time since pregnancy etc...
To look for associations between this metadata and alpha diversity I used stepwise feature selection on a mixed effects model, including mixed effects for individuals and timepoints, so the model looks like this:
Diversity ~ Environment + TimeSincePregnancy + ... + (1 | Individual) + (1 | TimePoint)
Note that in this case the mixed effect for the individuals accounts for the repeated measurements and the mixed effect for the timepoint accounts for batch effects (the biologically relevant variable for passage of time is TimeSincePregnancy ).
I've read multiple times that adonis is very sensitive to permutations schemes and that you should make sure to set those up properly for the result to be meaningful but the actual documentation as to how to do it is a bit lacking. How can I setup a permutation scheme that mirrors what I did with the mixed effects model for alpha diversity?
Note that I'm using the adonis2 function in R so I can use the strata and permutations parameter, and not just the formula.

Any help or even just a link to good documentation on the topic would be greatly appreciated.

Good morning!

Yep!

Yeah, the official docs require some additional context to understand. Check on this thread on Stack Exchange.

I'm not sure if the adonis() function supports formulas quite like that. I know it supports stepwise variance partitioning and I think that's equivalent to this part of your model: Diversity ~ Environment + TimeSincePregnancy + ...

I'm not sure what happens when you pass mixed effects for individuals and timepoints like + (1 | Individual) + (1 | TimePoint) :thinking:

Have you tried running this and see what it gives you? Are you familiar with the variance partitioning method used by adonis() and checked to see if it makes sense conceptually with the mixed effects in your formula?

1 Like