Learn R Programming

phytools (version 0.1-9)

anc.ML: Ancestral character estimation using likelihood

Description

This function estimates the evolutionary parameters and ancestral states for Brownian evolution using likelihood.

Usage

anc.ML(tree,x,maxit=2000)

Arguments

tree
an object of class "phylo".
x
a vector of tip values for species; names(x) should be the species names.
maxit
an optional integer value indicating the maximum number of iterations for optimization.

Value

  • a list with the following components:
  • sig2the variance of the BM process.
  • acea vector with the ancestral states.
  • logLikthe log-likelihood.
  • convergencethe value of $convergence returned by optim() (0 is good).

See Also

ace, anc.Bayes, optim

Examples

Run this code
tree<-rtree(50)
x<-fastBM(tree) # simulate using fastBM
anc.ML(tree,x) # fit model & estimate ancestral states

Run the code above in your browser using DataLab