Hi Santiago (and everyone else),
The vcv matrices you are getting in this case are incorrect.
Geiger's birthdeath.tree creates phylogenies that are only compatible
with some ape functions. The edge matrix seems, to me, to be fine, but
ape is expecting the nodes to appear in some particular order. If
anyone can tell me what is wrong with my edge matrices, I'll change
the function and fix this problem. In the meantime, the easiest fix
is a trick that seems to work for this and other similar problems:
tree1 <- birthdeath.tree(b=1, d=0, taxa.stop=8) # creates an
ultrametric tree with 8 species
plot(tree1)
### THIS IS THE FIX ###
tree2<-write.tree(text=read.tree(tree1))
### Now tree2 will work with all the ape functions
plot(tree2)
vcv.phylo(tree2, cor=F) #phylogenetic covariance matrix
vcv.phylo(tree2, cor=T) #phylogenetic correlation matrix?
Hope this helps.
Luke
On Feb 23, 2009, at 4:23 PM, Santiago Claramunt wrote:
Hi all,
I'm having problems calculating the the phylogenetic covariance
matrix of simulated trees.
tree1 <- birthdeath.tree(b=1, d=0, taxa.stop=8) # creates an
ultrametric tree with 8 species
plot(tree1)
vcv.phylo(tree1, cor=F) #phylogenetic covariance matrix
vcv.phylo(tree1, cor=T) #phylogenetic correlation matrix?
In most cases, the resultant matrix does not make sense: some
closely related species have zero covariance, and some off diagonal
elements are higher than the diagonal elements. Also, what's the
meaning of the correlation matrix in vcv.phylo()? Is it the
covariance matrix divided by the total time?
I'll appreciate any help with this.
Santiago
Santiago Claramunt
Museum of Natural Science,
119 Foster Hall,
Louisiana State University,
Baton Rouge, LA70803
[email protected]
http://www.museum.lsu.edu/Claramunt/Home.html
_______________________________________________
R-sig-phylo mailing list
[email protected]
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
_______________________________________________
R-sig-phylo mailing list
[email protected]
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo