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.