Learn R Programming

phytools (version 2.4-4)

bounded_bm: 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, ...)

Value

An object of class "bounded_bm".

Arguments

tree

object of class "phylo".

x

continuous character data in a vector.

lims

bounds. If NULL will be set to three times the observed range of the trait. (This is designed to be an effectively "unbounded" null model.)

...

optional arguments.

Author

Liam Revell liam.revell@umb.edu

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).

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

fitMk, fitmultiBM, fitThresh

Examples

Run this code
if (FALSE) {
## 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)}

Run the code above in your browser using DataLab