Fits a diversity-dependent phenotypic evolution model (similar to Mahler et al. 2010).
fitDiversityModel(tree, x, d=NULL, showTree=TRUE, tol=1e-6)
# S3 method for fitDiversityModel
logLik(object, ...)
# S3 method for fitDiversityModel
print(x, ...)
An object of class "fitDiversityModel"
consisting of the following elements:
log-likelihood of the fitted model.
estimated starting value for the rate at the root of the tree, \(\sigma_0^2\).
the estimated rate of change in the rate associated with the addition of a lineage.
a matrix with the variances and covariance of the estimated parameters (from the Hessian).
an object of class "phylo"
.
a vector with tip values for a continuously distributed trait. For print
method, an object of class "fitDiversityModel"
.
a vector containing the inferred historical diversity at each node in the tree - if d=NULL
(the default) function will treat the diversification as if it occurred in a single geographic area.
optional logical value indicating whether to plot the tree transformation implied by the model.
some small value by which d
is incremented during rescaling of psi
for optimization. If R thinks your matrices are singular during optimization, try increasing tol
slightly.
for logLik
method, an object of class "fitDiversityModel"
.
optional arguments for logLik
and print
methods. Note that for the logLik
method the number of fitted parameters ("df"
) is assumed to be 3 for the diversity dependent model (that is, if psi
is estimated) and 2 for the diversity independent model, unless otherwise specified (using the argument df
).
Liam Revell liam.revell@umb.edu
Mahler, D. L, L. J. Revell, R. E. Glor, and J. B. Losos (2010) Ecological opportunity and the rate of morphological evolution in the diversification of Greater Antillean anoles. Evolution, 64, 2731-2745.
Revell, L. J. (2024) phytools 2.0: an updated R ecosystem for phylogenetic comparative methods (and other things). PeerJ, 12, e16505.
brownie.lite
, estDiversity
, evol.rate.mcmc