3

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.

gung - Reinstate Monica
  • 132,789
  • 81
  • 357
  • 650
slam200
  • 31
  • 1
  • 1
    Why not just use a mixed effects model? – gung - Reinstate Monica Sep 10 '15 at 00:39
  • 1
    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 02: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 08 '18 at 04:16
  • 1
    @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](https://stats.stackexchange.com/q/13197/)). – gung - Reinstate Monica May 08 '18 at 12:20

1 Answers1

0

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?