1

I am running a perm-manova using the adonis2 function in vegan package. I have a significant interaction in my model, so would like to perform tukey-adjusted comparisons for the interaction using the lsmeans package.

However, while lsmeans accepts many model classes, it does not accept the class of the adonis object ([1] "anova.cca" "anova" "data.frame").

Is there a way I can coerce my adonis object to an lm, aov, manova object (or any other class accepted by lsmeans) so that I can use this function? Thank you

library(vegan)
library(lsmeans)

data(dune)
data(dune.env)

man<-adonis2(dune ~ Management*A1, data = dune.env)

lsmeans(man,pairwise ~ Management:A1,adjust="tukey")

Error in ref.grid(object = list(Df = c(3, 1, 3, 12), SumOfSqs = c(1.46859175179317,  : 
  Can't handle an object of class  “anova.cca” 
 Use help("models", package = "lsmeans") for information on supported models.
J.Con
  • 4,101
  • 4
  • 36
  • 64
  • 1
    This seems to be a known issue with `vegan` package. There are a few work arounds. See https://www.researchgate.net/post/post_hoc_adonis_in_R and maybe this wrapper: https://github.com/pmartinezarbizu/pairwiseAdonis You might have better luck at Cross Validated stack – Amar Apr 17 '18 at 05:40
  • 1
    @Amar thanks for the reply. However I specifically need to run pairwise comparisons on the interaction (`Management*A1`). So far I can't get the `pairwiseAdonis` function to do this. – J.Con Apr 17 '18 at 05:45
  • 1
    No. There is no way. – Jari Oksanen Apr 17 '18 at 06:09
  • @JariOksanen as the vegan maintainer, can you suggest an alternative way to perform post hoc tests given a significant interaction? Thank you for the reply. – J.Con Apr 17 '18 at 06:13
  • 1
    @J.Con: I don't know any post hoc tests for `adonis` or `adonis2`, but I am not a believer either. Please note that we use permutation tests in `adonis2`, and for post hoc tests you should build a permutation procedure instead of switching to parametric tess. – Jari Oksanen Apr 17 '18 at 18:57
  • @JariOksanen I understand. I believe that approach is taken in [this tutorial](https://thebiobucket.blogspot.com.au/2011/08/two-way-permanova-adonis-with-custom.html#more), do you think this is correct? Thank you – J.Con Apr 17 '18 at 22:35
  • 1
    @J.Con , yep, if you can build orthogonal contrasts like that. NB, this was for a balanced design. – Jari Oksanen Apr 18 '18 at 06:24
  • @JariOksanen Cool. I'll give it a go using [this tutorial](https://www.uvm.edu/~dhowell/StatPages/R/ContrastsInR.html). Thank you – J.Con Apr 18 '18 at 08:48

0 Answers0