chr.disp.sim: Simulate character displacement data

Description Usage Arguments Value Author(s) References See Also Examples

View source: R/chr.disp.sim.R

Description

Simulates data under a Brownian motion or character displacement model

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
chr.disp.sim(
  phy,
  n.steps = 1000,
  sigma = 1,
  a = 0,
  ntraits = 1,
  sympatry = NA,
  allopatry = NA,
  trait.lim = NA
)

Arguments

phy

An object of class phylo (see ape).

n.steps

Number of time steps the for the simulation (default = 1000 time steps).

sigma

The value of Brownian variance in the simulation

a

The strength of competition between inter-specific lineages

ntraits

Number of traits to be simulated

sympatry

an optional matrix giving the time that each pair of species starts to interact

allopatry

an optional matrix giving the times when species stop interacting

trait.lim

an optional parameter that puts limits on the available trait-space, preventing trait values with magnitude greater than the value of lim

Value

A list containing the the simulated data (tval) showing the sigma, a, mean gap and gap standard deviation. Additionally, if used, the user input sympatry (symp) and/or allopatry (allo) matrices

Author(s)

Magnus Clarke and Mark Puttick

References

Clarke M, Thomas GH, Freckleton RP. 2017. Trait evolution in adaptive radiations: modelling and measuring interspecific competition on phylogenies. The American Naturalist. 189, 121-137.

See Also

chr.disp.param, chr.disp.lrt

Examples

1
2
3
4
5
6
7
8
## import finch data form Clarke et al. (2017)
data(finches)
emp.tree <- finch.tree
emp.data <- finch.data
## simulate small amount of data 
## (example only - many more datasets are required for accuracy)
sim.data <- chr.disp.sim(emp.tree, n.steps=100,
sigma=1, a=2, ntraits=1, sympatry=NA, allopatry=NA, trait.lim=NA)

PuttickMacroevolution/motmot documentation built on June 5, 2020, 7 p.m.