Re: [R-sig-phylo] problem with corMartins (ape)

2013-08-01 Thread Xavier Prudent
Salut Sandra, I have experienced that the matrix given by vcv can lead to wrong results if taken as a correlation matrix in the case of trees where the tips do not have the same lengths. I then built my own correlation, using the common branch length shared by two tips, normalized by this same

Re: [R-sig-phylo] problem with corMartins (ape)

2013-08-01 Thread Emmanuel Paradis
Hi, Xavier: if I understand correctly what you describe, this can be done with: V - vcv(phy, corr = TRUE) diag(V) - 0 vcv() returns the expected variance-covariance matrix under Brownian motion for a given tree. If this tree is not ultrametric (I guess this is what you mean with where the

[R-sig-phylo] problem with corMartins (ape)

2013-07-29 Thread sandra goutte
Dear list, I am trying to run a gls with an OU correlation structure using corMartins. I first wanted to check whether i had a phylogenetic autocorrelation in my trait, so i used the Moran's I index (Moran.I): vcovm-vcv(corMartins(1,tree, fixed=T)) Moran.I(trait, vcovm, alt=greater) And i