Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

sim.corrs

Multivariate Brownian simulation with multiple correlations and rates


Description

This function conducts BM simulation on a tree with multiple rates and/or multiple evolutionary correlations between characters. If vcv is a single matrix, instead of a list of matrices, sim.corrs will simulate multivariate BM with a single rate matrix.

Usage

sim.corrs(tree, vcv, anc=NULL, internal=FALSE)

Arguments

tree

is a phylogenetic tree in 'phylo' format; or a modified 'phylo' tree with a mapped discrete character.

vcv

is a square covariance matrix or named list of matrices (one for each mapped state on the tree).

anc

optional vector of values for the root state.

internal

logical value indicating whether to return states at internal nodes.

Value

A matrix containing the multivariate tip states for the n species in the tree (and nodes if internal= TRUE).

Author(s)

References

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

Revell, L. J. (2012) phytools: An R package for phylogenetic comparative biology (and other things). Methods Ecol. Evol., 3, 217-223.

See Also


phytools

Phylogenetic Tools for Comparative Biology (and Other Things)

v0.7-70
GPL (>= 2)
Authors
Liam J. Revell
Initial release
2020-9-19

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.