Description Usage Arguments Value Author(s) References See Also Examples
Simulates data under a Brownian motion or character displacement model
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
)
|
phy |
An object of class |
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 |
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
Magnus Clarke and Mark Puttick
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.
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.