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.