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

Description Usage Arguments Value Examples

View source: R/brownian_motion_package.r

Description

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

Usage

1
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

1
2

Example output

            [,1]       [,2]        [,3]       [,4]        [,5]       [,6]
[1,] -0.14656928 -0.3399071  0.13384436 -0.2016413 -0.07425365 -0.9756667
[2,] -0.06027972 -0.1206057  0.08927664 -0.2561004  0.15028432 -0.6591985
[3,] -0.46461390 -0.8422452 -0.03374079  0.5528865  0.12062306 -1.0136341
[4,] -0.57546323  0.7946019  0.67174227 -0.3865695 -0.64189971 -0.7325630
           [,7]       [,8]       [,9]      [,10]
[1,] -0.3621249 -0.4483551  0.3865869 -0.2038783
[2,]  0.5047330 -0.7052965 -0.5889976  0.6072781
[3,]  0.4333590 -0.9430278  0.6977346 -0.2244558
[4,] -0.1186274  0.1987236  0.1486562 -0.2611025

PIGShift documentation built on May 2, 2019, 9:02 a.m.