# Multivariate data with repeated measures - restricted permutations

I have a data frame of multivariate abundances (species) that have been measured from sites under two different treatments. These same sites have been repeatedly measured over multiple years.

I am modelling the change in species abundances between treatments over time using the mvabund package in R. My model is abundance~treatment*year.

However, because the same sites have been sampled repeatedly they are repeated measures and thus are not independent between years. I want to account for this in my model by restricting the permutations using the permute package.

However, I am struggling to conceptually understand how I need to restrict the permutations to account for this non-independence.

• Why not just use a mixed effects model? – gung - Reinstate Monica Sep 10 '15 at 0:39
• Because the data are multivariate, I don't think theres a way to fit mixed effects models to multivariate data? Correct me if i'm wrong. – slam200 Sep 10 '15 at 2:19
• Did you ever figure this out? Also, @gung, do you know if the OP's point about multivariate species abundance data preclude using mixed effects models? – theforestecologist May 8 '18 at 4:16
• @theforestecologist, you would either need to find an existing package for multivariate mixed effects models, you would write out the full likelihood & optimize it yourself, or you would add dummies for the various components of the response (cf, here). – gung - Reinstate Monica May 8 '18 at 12:20

permID <- shuffleSet(n=nrow(df), nset=99, control=how(block=df\$year))