[R] as.dist with diagonal unequal zero

Sarah Goslee sarah.goslee at gmail.com
Wed Oct 10 18:17:38 CEST 2007

You may be better off using a complete distance matrix and a model
matrix describing plant sex, as explained in Legendre and Fortin 1989
and elsewhere.

Otherwise you will have to write your own Mantel code - all the examples
I know of (vegan and ecodist, primarily) assume that diagonals are
zero when doing the permutation testing of significance.

You can easily get the Mantel r since that's equivalent to a correlation
on distance matrices, but the permutation test is more complicated.

There's also an article on ecodist in the latest issue of Journal of
Statistical Software that covers mantel test variants.


On 10/10/07, Birgit Lemcke <birgit.lemcke at systbot.uzh.ch> wrote:
> This are distances but between male and female plants of the same
> species.
> species  A  B  C  D E --> male
>              A
>              B
>               C
>               D
>                |
>              female
> I would like to do a Manteltest.
> Birgit
Sarah Goslee

More information about the R-help mailing list