bounded_bm | R Documentation |
Fits a bounded Brownian motion model using the discrete approximation of Boucher & Demery (2016), or the "wrapped" or circular model of Martinet et al. (In revision).
bounded_bm(tree, x, lims=NULL, ...)
tree |
object of class |
x |
continuous character data in a vector. |
lims |
bounds. If |
... |
optional arguments. |
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
).
An object of class "bounded_bm"
.
Liam Revell liam.revell@umb.edu
Boucher, F. C., and V. Demery (2016) Inferring bounded evolution in phenotypic characters from phylogenetic comparative data. Systematic Biology, 65, 651-661.
Martinet, K. M., M. S. Juhn, F. C. Boucher, L. J. Harmon, L. J. Revell, S. I. A. Foerster, A. J. Shultz, K. Burns, M. E. Alfaro. (In revision) A wrapped Brownian motion model for traits on a circular scale.
Revell, L. J. (2024) phytools 2.0: an updated R ecosystem for phylogenetic comparative methods (and other things). PeerJ, 12, e16505.
fitMk
, fitmultiBM
, fitThresh
## 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.