adonis in vegan: Can I use it for four factors?

25 views Asked by At

I want to compare prey composition across groups and, based on other papers, I found that the adonis function was a good option, however I want to test 4 factors and I am not sure if that is an issue. I also would like to know how to choose the correct order in the formula as it seems to affect the results. Can someone help me?

This is what I have:

perm1<-adonis(dist.Y~Location+Species+Sex+Size, data, method= "binomial", permutations=999)

It works fine, I'm just not sure it is correct to do it this way. Also is it correct to do it with a single factor?

I just want to make sure my results are correct.

1

There are 1 answers

0
rw2 On

There's no problem with including four factors, but you might want to look at using adonis2 instead of adonis.

With adonis2 you can use the by argument to specify what you want to test. by = "terms" will assess significance for each term (sequentially from first to last), setting by = "margin" will assess the marginal effects of the terms (each marginal term analysed in a model with all other variables), by = "onedf" will analyse one-degree-of-freedom contrasts sequentially, by = NULL will assess the overall significance of all terms together.

Therefore, unlike in the original adonis function, the order of the variables doesn't matter unless you select by = "terms". I suspect you would be interested in marginal testing of variables using the by="marginal" parameter, where the output gives a partial R-squared for each variable in the model.