cladeModeSim: Simulate nested modes of evolution

Description Usage Arguments Value Examples

Description

Simulate various nested modes of continous trait evolution applied to the whole phylogeny (BM, OU, EB) or nested within subclades of the phylogeny ("nested EB", "nested EB rate", "rate Shift", "nested OU")

Usage

1
2
3
cladeModeSim(n = 1, phy, node = NULL, mode = c("BM", "EB", "nestedEB",
  "nestedEBRate", "rateShift", "nestedOU", "OU"), beta = 1, a = NULL,
  alpha = 0.05, shiftRate = 0.5, ebBeta = 2)

Arguments

n

number of datasets to simulate (default = 1)

phy

dated tree in APE format. Although non-ultrametric phylogenies can be used the method has only been tested on ultrametric trees

node

number of node at which to estimate nested evolutionary mode shift

mode

of evolution for the model. One of "BM", "EB", "OU", "nestedEB", "nestedEBRate", "rateShift", "nestedOU"). "BM" fits a simple model of Brownian Motion; "EB" fits the early burst model (Harmon et al. 2010); "OU" fits the Orstein-Uhlenbeck model (Hansen). The 'nested' models allow shifts to occur in subclades of the phylogeny with an ancestral BM model. 'nested EB' allows for a EB model to a subclade; 'nested EB rate' fits a model a similar model but with the addition of a scalar that allows for an increase on the ancestral BM rate; "nested OU" fits a nested model of the OU process which optimises the alpha parameter; and the "rateShift" model allows for a scalar-based increase or decrease rate in a nested subclade (O'Meara et al. 2006; Thomas et al. 2006)

beta

the value of the Brownian motion rate (default = 1) of the ancestral process

a

the value of the early burst parameter only applicable to the 'EB', 'nestedEB', and 'nestedEBRate' models. This value must be smaller than -1e-6, and a lower value signifies a larger exponential decrease through time. If NULL the value is the midpoint of the expected early burst values.

alpha

the value of the attraction parameter alpha only applicable for the 'OU' and 'nestedOU' models

shiftRate

the value of the shift scalar parameter (default = 1) that signifies an increase (> 1) or decrease (< 1) in the subclade rate of evolution. Only applicable to the 'rateShift' model

ebBeta

the value of the scaler for the nested early burst model (default = 2) that causes an increase in the nested clade alongside the early burst process. If ebBeta=1 this process is identical to the 'nestedEB' model

Value

y a matrix of simulated values

Examples

1
2
3
4
5
6
7
8
library(geiger)
set.seed(30)
# simulate tree with 20 species
simTree <- rcoal(20)
#Simulate BM data
simData <- cladeModeSim(n=1, phy=simTree, mode="BM")
#Simulate nested EB with a scalar increase of 5 and a EB rate 'a' of -2
simData <- cladeModeSim(n=1, phy=simTree, mode="nestedEB", ebBeta=5, a=-2)

PuttickMacroevolution/cladeMode documentation built on May 8, 2019, 3:47 a.m.