Learn R Programming

phytools (version 0.1-9)

evol.vcv: Likelihood test for variation in the evolutionary VCV matrix

Description

This function takes a modified "phylo" object with a mapped binary or multistate 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).

Usage

evol.vcv(scm.tre,dat,maxit=2000,vars=FALSE)

Arguments

scm.tre
a phylogenetic tree in modified "phylo" format (see read.simmap).
dat
an n x m matrix of tip values for m continuously valued traits in n species - row names should be species names.
maxit
an optional integer value indicating the maximum number of iterations for optimization - may need to be increased for large trees.
vars
an optional logical value indicating whether or not to estimate the variances of the parameter estimates from the Hessian matrix.

Value

  • a list with the following components:
  • R.singlevcv matrix for the single rate matrix model.
  • vars.singleoptionally, a matrix containing the variances of the elements of R.single.
  • logL1log-likelihood for single matrix model.
  • k1number of parameters in the single marix model.
  • R.multiplem x m x p array containing the p estimated vcv matrices for the p regimes painted on the tree.
  • vars.multipleoptionally, an array containing the variances of the parameter estimates in R.multiple.
  • logL.multiplelog-likelihood of the multi-matrix model.
  • k2number of parameters estimated in this model.
  • P.chisqP-value of the X^2 test on the likelihood ratio.
  • convergencelogical value indicating whether or not the optimization has converged.

Details

This function performs optimization by first optimizing 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. May have to increase maxit for large trees and more than 2 traits.

References

Revell, L. J., and D. C. Collar. 2009. Phylogenetic analysis of the evolutionary correlation using likelihood. Evolution, 63, 1090-1100.

See Also

evol.rate.mcmc, brownie.lite