Unlimited learning, half price | 50% off

Last chance! 50% off unlimited learning

Sale ends in


phytools (version 0.2-40)

rerootingMethod: Get marginal ancestral state reconstructions by re-rooting

Description

This function uses the re-rooting method of Yang et al. (1995) to get the marginal ancestral state estimates for each internal node of the tree using likelihood. This method get the conditional scaled likelihoods for the root node (which is the same as the marginal ancestral state reconstruction for that node) and successively moves the root to each node in the tree.

Usage

rerootingMethod(tree, x, model=c("ER","SYM"))

Arguments

tree
an object of class "phylo".
x
a vector of tip values for species; names(x) should be the species names.
model
any revsersible model. model=c("ER","SYM") recommended.

Value

  • a list containing the following elements:
  • loglikthe log-likelihood.
  • Qthe fitted transition matrix between states.
  • marginal.ancthe marginal ancestral state reconstructions for each node.

See Also

ace, make.simmap