anc.ML | R Documentation |
This function estimates the evolutionary parameters and ancestral states for Brownian evolution using likelihood. It is also possible (for model="BM"
) to allow for missing data for some tip taxa.
anc.ML(tree, x, maxit=2000, model=c("BM","OU","EB"), ...)
tree |
an object of class |
x |
a vector of tip values for species; |
maxit |
an optional integer value indicating the maximum number of iterations for optimization. |
model |
model of continuous character evolution on the tree. It's possible that only |
... |
optional arguments. |
Because this function relies on a high dimensional numerical optimization of the likelihood function, fastAnc
should probably be preferred for most purposes. If using anc.ML
, users should be cautious to ensure convergence.
This issue has been ameliorated in phytools >= 0.2-48 by seeding the ML optimization with the result from fastAnc
.
For model="EB"
this should also not be a problem as the numerical optimization is performed for only sig2
and r
, while the ML values of the ancestral states are obtained during every iteration of the optimization algorithmically using the re-rooting method.
An object of class "anc.ML"
with at least the following four elements (if not more, depending on model
):
sig2 |
the variance of the BM process. |
ace |
a vector with the ancestral states. |
logLik |
the log-likelihood. |
convergence |
the value of |
Liam Revell liam.revell@umb.edu
Revell, L. J. (2012) phytools: An R package for phylogenetic comparative biology (and other things). Methods Ecol. Evol., 3, 217-223.
Schluter, D., Price, T., Mooers, A. O., and Ludwig, D. (1997) Likelihood of ancestor states in adaptive radiation. Evolution 51, 1699-1711.
ace
, anc.Bayes
, fastAnc
, optim
## load data from Garland et al. (1992)
data(mammal.tree)
data(mammal.data)
## extract character of interest
ln.bodyMass<-log(setNames(mammal.data$bodyMass,
rownames(mammal.data)))
## estimate ancestral state under BM model
fit.BM<-anc.ML(mammal.tree,ln.bodyMass)
print(fit.BM)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.