I am using the adonis function in the vegan package to determine differences in dissimilarities in a community (PCB congeners) between several different factors. I also have decided to use the simper function to assess which community members contributed most to the observed differences. Is there a way for to include multiple factors in the simper function? I ran the adonis model shown below successfully, but the corresponding code for the simper function doesn't work. Many thanks.
# Adonis model
pcbtest3 <- adonis(pcbcong ~ FISH_CLASS+REACH+BASIN,
data=pcbcov,
method="bray",
permutations=999
)
# pcbcong=matrix of community dissimilarities
# FISH_CLASS,REACH, BASIN are factors
# Simper
simp <- with(pcbcov, simper(pcbcong,(FISH_CLASS, BASIN, REACH)))
simper can be used only with one grouping variable.
A workaround would be to use interaction() to create a new grouping variable from all three factors.
Interpretation of this will be awkward (depending how many factor levels you have) and I don't know if that`s meaningful at all - so be careful.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With