0

I am learning how to do PERMANOVA, it is really a challenge when I started from the example. The following code is from the help page in adonis. I can go through the example, but can't figure out why it is incorrect (no strata)? Does that mean I have to obtain strata data to use adonis?

data(dune)
data(dune.env)

### Example of use with strata, for nested (e.g., block) designs.
dat <- expand.grid(rep=gl(2,1), NO3=factor(c(0,10)),field=gl(3,1) )
Agropyron <- with(dat, as.numeric(field) + as.numeric(NO3)+2) +rnorm(12)/2
Schizachyrium <- with(dat, as.numeric(field)-as.numeric(NO3)+2) +rnorm(12)/2
Y <- data.frame(Agropyron, Schizachyrium)
mod <- metaMDS(Y)
plot(mod)

### Hulls show treatment
with(dat, ordihull(mod, group=NO3, show="0"))
with(dat, ordihull(mod, group=NO3, show="10", col=3))

### Spider shows fields
with(dat, ordispider(mod, group=field, lty=3, col="red"))

### Correct hypothesis test (with strata)
adonis(Y ~ NO3, data=dat, strata=dat$field, perm=999)

### Incorrect (no strata)
adonis(Y ~ NO3, data=dat, perm=999)

enter image description here

Ming
  • 181
  • 2
  • 10

1 Answers1

1

In PERMANOVA, the PER bit stands for permutation tests. Permutation tests are only valid if you shuffle samples that are truly exchangeable under the experimental design of the study. In this instance, the example uses a blocked study and hence the permutation test is only valid if you permute sample within the levels of strata and never between the levels of strata.

That's what the comment Incorrect (no strata) refers to; that the unrestricted permutation test for these data is incorrect.

Gavin Simpson
  • 170,508
  • 25
  • 396
  • 453
  • Thanks, Gavin. Is it **the original design of the study** that does not allow the permutation test between the levels of `strata`? I looked into the `dat <- expand.grid(rep=gl(2,1), NO3=factor(c(0,10)),field=gl(3,1) )`. According to the `rep` variable in `dat`, it seems that there were repeated measurements in three fields. Is my understanding right? I am not sure what is blocked study. –  Ming Dec 25 '15 at 06:16