This function performs fast estimation of the ML ancestral states for a continuous trait by taking advantage of the fact that the state computed for the root node of the tree during Felsenstein's (1985) contrasts algorithm is also the MLE of the root node. Thus, the function reroots the tree at all internal nodes and computes the contrasts state at the root each time.
Usage
fastAnc(tree, x)
Arguments
tree
an object of class "phylo".
x
a vector of tip values for species; names(x) should be the species names.
Value
a named vector containing the states at internal nodes - names are node numbers.