Simulate phylogenetic comparative data as Brownian motions with inverse gamma distributed rates

Share:

Description

This function simulates the evolution of a group of traits evolving as independent Brownian motions with inverse gamma distributed rates.

Usage

1
norminvgamma.shift.sim.group(phy, alpha, beta, rates, n)

Arguments

phy

an ape format phylogeny on which to simulate

alpha

the shape parameter of the inverse gamma distribution

beta

the scale parameter of the inverse gamma distribution

rates

a vector of rates, with each entry corresponding to an edge of phy. Rates should be in the same order as edges in phy$edge

n

the number of traits to simulate

Value

A matrix with each row corresponding to a species and each column corresponding to a trait

Examples

1
2

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.