I try to understand a PERMANOVA
assumtption that is multivariate spread
among groups is similar to variance homogeneity in univariate ANOVA
, for this I make a R code and I don't find this results, why?
My code:
library(vegan)
# Four similar populations:
spdf <- matrix(NA, 60, 4, dimnames =
list(1:60, c("sp1", "sp2", "sp3", "sp4")))
spdf <- as.data.frame(spdf)
eff <- sort(rep(1:6, 10))
spdf$sp1 = eff + rnorm(60, 0, 0.25)
spdf$sp2 = eff + rnorm(60, 0, 0.25)
spdf$sp3 = eff + rnorm(60, 0, 0.25)
spdf$sp4 = eff + rnorm(60, 0, 0.25)
#3 Treatment
treat <- gl(3, 20, labels = paste("t", 1:3, sep=""))
# distance matrix
envdist <- vegdist(spdf, method="euclidean")
# when computing beta-dispersion in anova we have no group differences
# but in adonis is different
anova(betadisper(envdist, treat))
adonis(spdf~treat)
You seem to be confusing a lot of things here. PERMANOVA is a multivariate ANOVA with permutation-based testing. PERMANOVA tests for differences between group centroids --- in other words it compares the multivariate means. It does assume homogeneity of variances. To check that any difference between groups in terms of their centroids is not being induced by differences in variances, we might use the multivariate dispersion method implemented in
betadisper()
in R.adonis()
andbetadisper()
are doing very different things:adonis()
gives an analysis like PERMANOVA,betadisper()
gives an analysis of multivariate spread.What we can conclude therefore is that the two methods correctly detect a difference in means (
adonis()
shows a significanttreat
effect)and that
betadisper()
correctly (all your groups had the same dispersion) fails to reject the null hypothesis of homogeneous multivariate dispersionsThis is all in accord with the way you simulated the data.