I'm not sure if this question falls in Cross Validated or Stack Overflow. I am specifically interested in differences in community composition between univariate population groups of a longitudinal microbiome study. However, individuals could provide between 1 and 20 samples at any point during this study period, thereby making the design quite unbalanced. I am using R to do my analyses, and my interpretation of most of the suggestions related to this question that I see online lead me to try the following:
adonis(as.dist(dm) ~ groupvar, strata=indID)
groupvar is the variable that I'm interested in, and
indID is the ID of the participant, within whom the repeated measures arise. However, the resulting model provides results that don't vary at all from just using:
adonis(as.dist(dm) ~ groupvar)
Therefore, I interpret this as the strata argument not doing anything. I have additionally tried using
block instead of
strata to the same effect. Is it, however, a breakdown of my understanding of PERMANOVA/adonis?
Another method I have tried is to include my
indID as another independent variable in my analysis as follows:
adonis(as.dist(dm) ~ groupvar + indID)
...And potentially switching the order such that
indID "soaks up" the variation before
groupvar has the chance (as that is how I am currently interpreting the fact that order matters when using adonis).
Finally, an alternative method I have been using is to take the first principal coordinate of the ordination and use a linear mixed-effects model to determine if there is any separation at all between the two groups, taking into account the repeated measures. However, this method is obviously severely limited by how much of the variation occurs in the first PC.