Learn R Programming

PIGShift (version 1.0.1)

OU.invgamma.sim.group: Simulate phylogenetic comparative data as OUs with inverse gamma distributed rates

Description

This function simulates the evolution of a group of traits evolving as independent Ornstein-Uhlenbeck processes with inverse gamma distributed rates.

Usage

OU.invgamma.sim.group(phy, theta, alpha, beta, n)

Arguments

phy
an ape format phylogeny on which to simulate
theta
the strength of constraint
alpha
the shape parameter of the inverse gamma distribution
beta
the scale parameter of the inverse gamma distribution
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

Run this code
data(yeast)
OU.invgamma.sim.group(yeast.tree,2,2,2,10)

Run the code above in your browser using DataLab