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.

  • 1
    $\begingroup$ Why not just use a mixed effects model? $\endgroup$ – gung - Reinstate Monica Sep 10 '15 at 0:39
  • 1
    $\begingroup$ 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. $\endgroup$ – slam200 Sep 10 '15 at 2:19
  • $\begingroup$ 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? $\endgroup$ – theforestecologist May 8 '18 at 4:16
  • 1
    $\begingroup$ @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). $\endgroup$ – gung - Reinstate Monica May 8 '18 at 12:20

Assuming your design is in the dataframe df and community counts in com

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

mod1 <- manyglm(com ~ treatment, family="negative.binomial")
mod2 <- manyglm(com ~ treatment*year, family="negative.binomial")

anova(mod1, mod2, bootID = permID)

I think this will work. Any other suggestions?

| cite | improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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