rateshift {phytools} | R Documentation |
Find the temporal position of one or more rate shifts
Description
Fits a model with one or more temporal rate shifts for a continuous trait on the tree.
Usage
rateshift(tree, x, nrates=1, niter=10, method="ML", ...)
## S3 method for class 'rateshift'
plot(x, ...)
likSurface.rateshift(tree, x, nrates=2, shift.range=NULL,
density=20, plot=TRUE, ...)
Arguments
tree |
object of class |
x |
vector of phenotypic trait values for species. |
nrates |
number of rates. |
niter |
number of iterations of optimization routine to ensure convergence. |
method |
optimization method. Can be |
... |
optional arguments. In the case of the |
shift.range |
for |
density |
for |
plot |
logical argument for |
Details
rateshift
attempts to find the location of one or more rate shifts. This model is quite easy to compute the likelihood for, but quite difficult to optimize as the likelihood surface is often rugged.
likSurface.rateshift
plots the likelihood surface.
Value
A fitted object of class "rateshift"
, or, in the case of likSurface.rateshift
, a likelihood surface for the shift points.
Author(s)
Liam Revell liam.revell@umb.edu
References
Revell, L. J. (2024) phytools 2.0: an updated R ecosystem for phylogenetic comparative methods (and other things). PeerJ, 12, e16505.
Revell, L. J. and L. J. Harmon (2022) Phylogenetic Comparative Methods in R. Princeton University Press.