evol.vcv | R Documentation |
Fits a multi-regime multivariate Brownian motion model following Revell & Collar (2009).
evol.vcv(tree, X, maxit=2000, vars=FALSE, ...)
tree |
an object of class |
X |
an |
maxit |
an optional integer value indicating the maximum number of iterations for optimization. This quantity may need to be increased for difficult optimizations. |
vars |
an optional logical value indicating whether or not to estimate the variances of the parameter estimates from the Hessian matrix. |
... |
optional arguments. The most important optional argument at this time is |
The function takes an object of class "simmap"
with a mapped binary or multi-state trait and data for an arbitrary number of continuously valued character. It then fits the multiple evolutionary variance-covariance matrix (rate matrix) model of Revell & Collar (2009; Evolution).
evol.vcv
performs optimization by maximizing the likelihood with respect to the Cholesky matrices using optim
. Optimization is by method="Nelder-Mead"
. Using box constraints does not make sense here as they would be applied to the Cholesky matrix rather than the target parameters. Users may have to increase maxit
for large trees and/or more than two traits.
An object of class "evol.vcv"
with the following elements:
R.single |
vcv matrix for the single rate matrix model. |
vars.single |
optionally, a matrix containing the variances of the elements of |
logL1 |
log-likelihood for single matrix model. |
k1 |
number of parameters in the single matrix model. |
R.multiple |
|
vars.multiple |
optionally, an array containing the variances of the parameter estimates in |
logL.multiple |
log-likelihood of the multi-matrix model. |
k2 |
number of parameters estimated in this model. |
P.chisq |
P-value of the |
convergence |
logical value indicating whether or not the optimization has converged. |
Liam Revell liam.revell@umb.edu
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 D. C. Collar (2009) Phylogenetic analysis of the evolutionary correlation using likelihood. Evolution, 63, 1090-1100.
evol.rate.mcmc
, brownie.lite
## load data from Revell & Collar (2009)
data(sunfish.tree)
data(sunfish.data)
## fit multi-correlation model
sunfish.fit<-evol.vcv(sunfish.tree,sunfish.data[,2:3])
print(sunfish.fit)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.