bounded_bm {phytools} | R Documentation |
Fits bounded and wrapped Brownian motion models
Description
Fits a bounded Brownian motion model using the discrete approximation of Boucher & Demery (2016), or the "wrapped" or circular model of Juhn et al. (In review).
Usage
bounded_bm(tree, x, lims=NULL, ...)
Arguments
tree |
object of class |
x |
continuous character data in a vector. |
lims |
bounds. If |
... |
optional arguments. |
Details
Optional arguments include (but are not limited to): parallel
, defaults to parallel=FALSE
; df
, to adjust the degrees of freedom of the model, depending on whether or not the bounds have been set from the observed data; levs
, number of levels for the discretization (defaults to levs=200
); and wrapped
, logical indicating whether to fit the "circular" or wrapped model, instead of the standard bounded model (defaults to wrapped=FALSE
).
Value
An object of class "bounded_bm"
.
Author(s)
Liam Revell liam.revell@umb.edu
References
Boucher, F. C., and V. Demery (2016) Inferring bounded evolution in phenotypic characters from phylogenetic comparative data. Systematic Biology, 65, 651-661.
Juhn, M., K. Martinet, F. Boucher, A. Schultz, L. Harmon, K. Burns, and M. Alfaro (In review) A wrapped Brownian motion model for the evolution of color.
Revell, L. J. (2024) phytools 2.0: an updated R ecosystem for phylogenetic comparative methods (and other things). PeerJ, 12, e16505.
See Also
Examples
## Not run:
## load tree and data
data(eel.tree)
data(eel.data)
## extract trait of interval
maxTL<-setNames(eel.data$Max_TL_cm,
rownames(eel.data))
## fit bounded model
eel_bounded<-bounded_bm(eel.tree,maxTL,levs=200,
parallel=TRUE,lims=range(maxTL))
## fit unbounded model
eel_unbounded<-bounded_bm(eel.tree,maxTL,levs=200,
parallel=TRUE)
## compare models using AIC
AIC(eel_bounded,eel_unbounded)
## End(Not run)