Skip to content
Prev 1684 / 7420 Next

relative compositional dissimilarity among sites against a continuous variable

On 24/11/10 23:48 PM, "Pekin, Burak K" <bpekin at purdue.edu> wrote:

            
Burak,

If this is really what you need, remember that diagonal elements of the
dissimilarity matrix are zeros (dissimilarity between the object and
itself). This means that the row or column mean of the dissimilarity to
*other* sites is underestimated. You should either make the diagonal to NA:

d <- as.matrix(vegdist(x))
diag(d) <- NA
rowMeans(d, na.rm = TRUE)

or adjust the means for one zero element:

d <- as.matrix(vegdist(x))
rowMeans(d)*(nrow(d)/(nrow(d)-1))

This does not influence the ranks, but it doesn't hurt if your numbers are
correct.
The mean dissimilarity is found for your observations, so it is of the same
length as your data vectors. You can use functions like lm(), glm(), nls(),
gam() or some hundred other alternatives in packages to analyse the results.

Cheers, Jari Oksanen