Sunday, September 20, 2015
Adonis (PERMANOVA) - Assumptions
Before you use PERMANOVA (R-vegan function adonis) you should read the user notes for the original program by the author (Marti J. Anderson) who first came up with this method. An important assumtption for PERMANOVA is same "multivariate spread" among groups, which is similar to variance homogeneity in univariate ANOVA.
library(vegan)
# two similar populations:
dat1a<-matrix(sample(c(0,1,1,1),200,replace=T),10,20)
dat1b<-matrix(sample(c(0,1,1,1),200,replace=T),10,20)
# generating a third sample from the same population, but with reduced
# number of species occurrences. this set will have higher
# beta-diversity (or "multivariate spread"):
dat2<-matrix(sample(c(0,0,0,1),200,replace=T),10,20)
# distance matrices:
fac<-gl(2,10)
dist11<-vegdist(rbind(dat1a,dat1b))
dist12<-vegdist(rbind(dat1a,dat2)):
# when computing sets with same beta-dispersion we get a
# correct adonis result with no sign. group differences
# in species composition:
anova(betadisper(dist11,fac))
adonis(rbind(dat1a,dat1b)~fac)
# when using sets with different beta-diversity you may
# get false significant adonis results - the location/composition
# is actually the same (!) this result is due to different
# multivariate spread in dat1 and dat2:
anova(betadisper(dist12,fac))
adonis(rbind(dat1a,dat2)~fac)
# see ordination diagram where location (centroids) between dat1 and dat2
# is not shifted more than for dat1a dat1b, still you yield a (false)
# sign. adonis result
# plot:
windows(10,5)
opar<-par()
par(mfrow=c(1,2))
plot(meta11<-metaMDS(dist11,zerodist=ignore),type="n",
main="same beta-disp\nsame location")
points(meta11,select=which(fac==1),col="red")
points(meta11,select=which(fac==2),col="blue")
ordispider(meta11,group=fac)
plot(meta12<-metaMDS(dist12,zerodist=ignore),type="n",
main="diff beta-disp\nsame location")
points(meta12,select=which(fac==1),col="red")
points(meta12,select=which(fac==2),col="blue")
ordispider(meta12,group=fac)
par(opar)
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment