I am using gowdis() from the FD package, and gawdis() from the gawdis package to compute the dissimilarity of communityXtrait (for NMDS) and speciesXtrait matrices. The two functions have the same output for speciesXtrait matrix but the result of communityXtrait matrix is different.
The columns of both matrices are identical. How is this possible? What am I doing wrong?
My traits are numerical, ordinal, and fuzzy. For this reason, in gowdis() I computed the dissimilarity #for each trait separately and averaged them:
dis.gow <- (gowdis(sp.trait[1]) + gowdis(sp.trait[2:6])/max(gowdis(sp.trait[2:6]))+
gowdis(sp.trait[7:10])/max(gowdis(sp.trait[7:10])) +
gowdis(sp.trait[11:13])/max(gowdis(sp.trait[11:13])) +
gowdis(sp.trait[14:17])/max(gowdis(sp.trait[14:17])) +
gowdis(sp.trait[18]) + gowdis(sp.trait[19]) +
gowdis(sp.trait[20:22])/max(gowdis(sp.trait[20:22])) +
gowdis(sp.trait[23:25])/max(gowdis(sp.trait[23:25])) +
gowdis(sp.trait[26:29])/max(gowdis(sp.trait[26:29])) )/10
dis.gaw <- gawdis(sp.trait, w.type = "equal",
groups = rep(1:10, c(1,5,4,3,4,1,1,3,3,4) ) , fuzzy = c(2,3,4,5,8,9,10))
dis.gaw == dis.gow #all values are TRUE
#comXtrait is computed as below
com.trait <- as.matrix(ab) %*% as.matrix(sp.trait)
but the exact same procedure for community X trait returned different results.