Description Usage Arguments Value Author(s) References
View source: R/simTraitsIndividuals.R
This function simulates traits for a given number of individuals per species and the population size for the species
1 2 3 4 5 6 7 8 9 10 11 12 | simTraitsIndividuals(
Tree,
Ntraits = 1,
IndPop,
PopFluc = NULL,
GenLength = 1,
Sigma2 = NULL,
Cor = NULL,
Alpha = NULL,
Scenario = "A",
TraitModel = "BM"
)
|
Tree |
The species tree |
Ntraits |
Number of traits to simulate |
IndPop |
Matrix or data.frame with the number of individuals per species in the first column and the species' population size in the second column. This element is returned by simGenealogy ('Species'). |
PopFluc |
Optional matrix or data.frame with the parameters for a fluctuating population size (returned as third element form simGenealogy) |
Sigma2 |
Optional Brownian motion rate for trait evolution. Vector of length one (the same for all traits and species) or a seperate rate per species. |
Cor |
Optional correlation strength between traits in the range -1,1. Either a vector of length one (same strength between all traits) or Ntraits*(Ntraits-1)/2. |
Alpha |
Optional strength of pull towards the morphological optima. Only effective for scenarios A, B and C. If not specified, optima is (theoretically) reached after half of the tree depth. |
TraitModel |
Model of trait evolution. Ether Brownian motion (BM) or Orenstein-Uhlenbeck (OU). |
GenLen |
Optional vector of length one for generation length (the same for all species) |
A matrix with traits in columns and names of individuals per species as rownames
Torsten Hauffe
Fujisawa, T. and T. Barraclough (2013): Delimiting species using single-locus data and the Generalized Mixed Yule Coalescent approach: a revised method and evaluation on simulated data sets. Systematic Biology 62(5), 707-724.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.