[R-sig-eco] Two-way contrasts with adonis()

microbiomics microbiomics at mytng.de
Tue Mar 8 14:20:18 CET 2016


Dear Alexandre,

I may not have understood what you are up to, but your approach appears 
quite strange to me. If you wish to perform a two-way permanova with 
interactions, this would be:

fullModel <- adonis(sp ~ treat * imp, method = "euclidean")

fullModel


Call:
adonis(formula = sp ~ treat * imp, method = "euclidean")

Permutation: free
Number of permutations: 999

Terms added sequentially (first to last)

Df SumsOfSqs MeanSqs F.Model R2 Pr(>F)
treat 2 657.60 328.80 1197.73 0.88707 0.001 ***
imp 1 68.66 68.66 250.12 0.09262 0.001 ***
treat:imp 2 0.23 0.11 0.42 0.00031 0.646
Residuals 54 14.82 0.27 0.02000
Total 59 741.31 1.00000

 From this, you can see that the interaction term treat:imp is not 
significant. Thus, performing pairwise comparisons for all factor 
combinations does not make sense in the first place - it would be enough 
to concentrate on the main effects here.

Now, _suppose_ the interaction _was_ significant; then you could do the 
following:

For a pairwise comparison "c1" of impyes and impno within treatt1, do:

c1 <- Treat_Imp[, 1] - Treat_Imp[, 2]
adonis(sp[as.logical(c1), ] ~ c1[as.logical(c1)], method = "euclidean")

Repeat the above for treatt2 and treatt3.

As mentioned above, I may be off the track regarding your underlying 
purpose, and perhaps others here have better ideas regarding this issue. 
Nonetheless, I hope that helps. ;-)


Best,
Sven



More information about the R-sig-ecology mailing list