[R-sig-eco] adonis question

Kay Cecil Cichini Kay.Cichini at uibk.ac.at
Sat Jun 25 12:20:44 CEST 2011


hello etienne,

i tried many times and it's alway significant.

i also added:

par(mfrow = c(2, 2))
for (i in 1:4) {print(interaction.plot(treat, imp, spdf[, i]))}

...that did not show an interaction for any set of random numbers i tried.

yours,
kay

Zitat von Etienne Laliberte <etiennelaliberte at gmail.com>:

> Dear Kay,
>
> I ran your code and found no significant interactions. You just got
> "unlucky" with rnorm(), as can happen. Try it again.
>
> Cheers,
>
> Etienne
>
> -----Original Message-----
> From: r-sig-ecology-bounces at r-project.org
> [mailto:r-sig-ecology-bounces at r-project.org] On Behalf Of Kay Cecil Cichini
> Sent: Friday, 24 June 2011 9:31 PM
> To: r-sig-ecology
> Subject: [R-sig-eco] adonis question
>
> hi all,
>
> i played around with adonis and came across a result that i can't
> explain - more precisely i get a sign interaction-effect where i
> suppose there should be none:
>
> library(vegan)
>
> # species matrix/df
> spdf <- matrix(NA, 60, 4, dimnames = list(1:60, c("sp1", "sp2", "sp3",
> "sp4")))
> spdf <- as.data.frame(spdf)
>
> # 1st factor = treatment:
> treat <- gl(3, 20, labels = paste(1:3, "t", sep=""))
>
> # 2nd factor = impact:
> imp <- rep(gl(2, 10, labels = c("yes", "no")), 3)
>
> # simulating effect -
> # simulation will add similar effect
> # across level combinations, no interactions:
> eff <- sort(rep(1:6, 10))
>
> # add random noise:
> 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)
>
> # difference imp:yes vs imp:no is the same across all levels of treatment
> aggregate(sp1 ~ imp * treat, data = spdf, FUN = mean)
>
> # univariate ANOVAs with no interactions, as expected:
> for (i in 1:4) {print(summary(aov(spdf[, i] ~ treat * imp)))}
>
> # PERMANOVA - strangly gives sign. interaction (??)
> adonis(spdf ~ treat * imp, dist = "euclidean")
>
> thanks in advance,
> kay
>
> _______________________________________________
> R-sig-ecology mailing list
> R-sig-ecology at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-ecology
>
>



More information about the R-sig-ecology mailing list