[R] ape comparative analysis query

Simon Blomberg simonb at cres10.anu.edu.au
Thu May 11 04:02:28 CEST 2006


Chris Knight wrote:
>
> This raises various questions:
>
> 1) Was I misleading myself that my independent contrasts were valid in
> the first place?
>   
I think partly. Independent contrasts were designed for data for tip 
taxa only, not ancestral state data. One of the steps in the algorithm 
requires a correction to account for the fact that ordinarily the values 
for traits at nodes are estimated and not known, basically lengthening 
the branch length to that node by a certain amount (See Felsenstein's 
original paper). If you have known ancestral states, then you should not 
make this correction.
> 2) What is it, if anything, about the root taxon that causes this issue,
> given that other taxa also have zero branch lengths?
>   
When converting a tree to a correlation matrix for use in GLS or GEE, 
the Brownian motion assumption implies that the covariances among taxa 
are represented by their shared branch length from the root, and the 
height of each terminal taxon is equal to the variance of the trait for 
that taxon. If the tree is ultrametric, then the variances are equal. In 
your case, the root has zero covariance with each taxon, and zero 
variance. Now, the error in the gls call is caused by a division by zero 
in the calculation of the correlation matrix, because the root has zero 
variance. try:

vcv.phylo(tree)
vcv.phylo(tree, cor=TRUE)

> 3) Is there any way of getting around this and including data on the
> root taxon, or am I better off just dropping it (ultimately I want to
> work with much larger trees (up to tens of thousands of taxa) where that
> one piece of information will become relatively less important)
>   
I'm surprised that you have known values for the root data. Are you sure 
that the root taxon is not actually an outgroup? If so, it will have 
some branch length (variance), and the model should fit OK.

HTH,

Simon.

> Any help very much appreciated,
>
> Chris
>
> I'm working with ape 1.8-2 in R 2.1.1 under ubuntu 'Breezy' linux
> (unfortunately 2.1.1 is the latest easily available in breezy)
>
>




More information about the R-help mailing list