Function finds the location of one or more rate shifts. likSurface.rateshift
plots the likelihood surface (which is sometimes quite rugged).
rateshift(tree, x, nrates=1, niter=10, method="ML", ...)
# S3 method for rateshift
plot(x, ...)
likSurface.rateshift(tree, x, nrates=2, shift.range=NULL,
density=20, plot=TRUE, ...)
object of class "phylo"
.
vector of phenotypic trait values for species. names(x)
should contain the species names and match tree$tip.label
. For plot
method, x
is an object of class "rateshift"
.
number of rates.
number of iterations of optimization routine to ensure convergence.
optimization method. Can be "ML"
(maximum likelihood) or "REML"
(restricted maximum likelihood).
optional arguments. In the case of the plot
method, these will be passed to plotSimmap
. For rateshift
, optional arguments include: tol
, tolerance; plot
& print
, logical values indicating whether to plot or print the progress of the optimization (default to FALSE
); quiet
, logical argument indicating whether to suppress all notifications (defaults to FALSE
); minL
, numeric value; and fixed.shift
, either a vector of fixed shift points, or a logical value.
for likSurface.rateshift
.
for likSurface.rateshift
.
logical argument for likSurface.rateshift
. If plot=FALSE
then the surface is returned.
A fitted object of class "rateshift"
, or, in the case of likSurface.rateshift
, a likelihood surface for the shift points.
Revell, L. J. (2012) phytools: An R package for phylogenetic comparative biology (and other things). Methods Ecol. Evol., 3, 217-223.