anc.trend {phytools} | R Documentation |
This function estimates the evolutionary parameters and ancestral states for Brownian evolution with directional trend.
anc.trend(tree, x, maxit=2000)
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. |
Note that this will generally only work and produce sensible results for a phylogeny with some non-contemporary tips (i.e., a tree with some fossil species). The function uses optim
with method="L-BFGS-B"
; however optimization is only constrained for the sig2
which must be >0.
A list with the following components:
ace |
a vector with the ancestral states. |
mu |
a trend parameter per unit time. |
sig2 |
the variance of the BM process. |
logL |
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.
tree<-rtree(20) x<-fastBM(tree,mu=2) # simulate using fastBM with a trend (m!=0) anc.trend(tree,x) # fit model & estimate ancestral states