One final comment on this. Since the conditional scaled likelihoods of
the subtree and the marginal ancestral state reconstruction are
equivalent at the root node of the tree, a computationally simple (but
slow) method for getting the marginal ancestral state reconstructions is
to move the root
Just to follow up on ace(...,type="discrete"), which I believe is not
doing what many people think it is doing:
http://blog.phytools.org/2013/03/conditional-scaled-likelihoods-in-ace.html.
Please don't take this as a criticism of ace - but I believe that the
difference between conditional, mar
Hi Andres.
To answer your question at its face value, the line of code you want is:
anc<-setNames(apply(ANC$lik.anc,1,function(x)
names(which.max(x))),length(tree$tip.label)+1:tree$Nnode)
(The setNames ensures that your resultant vector gets the node numbers
for names.)
This message really
Sorry if this was addressed before.
I reconstructed a binary discrete character with* ace* (coded as 0-1).
As suggested in APER 2nd edition with the* Sylvia *case I can obtain the
"lik.anc" values but I wanted to derive the ancestral states from this
matrix.
*First*
*ANC <- ace (data$character,