brownieREML | R Documentation |
Fits a multi-rate Brownian motion evolution model using REML. (See brownie.lite
for more details.)
brownieREML(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 - may need to be increased for large trees. |
... |
optional arguments. |
This function takes an object of class "phylo"
or an object of class "simmap"
with a mapped binary or multi-state trait (see read.simmap
) and data for a single continuously valued character. It then uses restricted maximum likelihood (REML) to fit the Brownian rate variation ("noncensored") model of O'Meara et al. (2006; Evolution). This function is similar to brownie.lite
but uses REML (which is faster and unbiased) instead of ML. REML optimization takes advantage of Felsenstein's (1985) contrasts algorithm.
An object of class "brownieREML"
containing the following components:
sig2.single |
is the rate, |
logL1 |
log-likelihood of the single-rate model. |
sig2.multiple |
is a length p (for p rates) vector of BM rates ( |
logL2 |
log-likelihood of the multi-rate model. |
convergence |
numerical value from |
Liam Revell liam.revell@umb.edu
Felsenstein, J. (1985) Phylogenies and the comparative method. American Naturalist, 125, 1-15.
O'Meara, B. C., C. Ane, M. J. Sanderson, and P. C. Wainwright (2006) Testing for different rates of continuous trait evolution using likelihood. Evolution, 60, 922-933.
Revell, L. J. (2024) phytools 2.0: an updated R ecosystem for phylogenetic comparative methods (and other things). PeerJ, 12, e16505.
brownie.lite
, evol.vcv
, evol.rate.mcmc
, ratebytree
## load data from Revell & Collar (2009)
data(sunfish.tree)
data(sunfish.data)
## extract character of interest
gape.width<-setNames(sunfish.data$gape.width,
rownames(sunfish.data))
## fit model
multiBM.reml<-brownieREML(sunfish.tree,
gape.width)
print(multiBM.reml)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.