Reputation: 51
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)))
Upvotes: 2
Views: 1936
Reputation: 13280
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.
Upvotes: 1