Description Usage Arguments Value Author(s) References See Also
This function wraps the sim.char
in geiger function to simulate evolutionary models under a given evolutionary rate matrix, with the option of simulating multiple within-species observations and missing data.
1 2 3 | sim.traits(ntaxa = 15, ntraits = 4, nreps = 1,
nmissing = 0, tree, v, anc, intraspecific,
model = "BM", parameters, nsim = 1, return.type = "matrix")
|
ntaxa |
Number of species to randomly generate on a pure-birth phylogeny (used if |
ntraits |
Number of traits to randomly simulate according to a random evolutionary rate matrix (used if |
nreps |
Number of within-species observations to simulate (default is 1). |
nmissing |
Number of observations to randomly remove from the simulated data (default is 0). |
tree |
Optional: an object of class |
v |
The evolutionary covariance matrix. If none provided, a random covariance matrix of size ntraits-by-ntraits is generated. |
anc |
An optional vector of ancestral values. |
intraspecific |
An optional vector of within-species variance. |
model |
The evolutionary model to simulate trait evolution (BM, OUrandomRoot, OUfixedRoot, EB, lambda, kappa, or delta). |
parameters |
The evolutionary model parameter in a named list. Example: |
nsim |
Number of datasets to simulate. |
return.type |
"data.frame" or "matrix" |
trait_data |
Simulated trait data |
tree |
The phylogenetic tree |
sim_tree |
The phylogenetic tree with specified branch length transformations |
Eric W. Goolsby
Harmon Luke J, Jason T Weir, Chad D Brock, Richard E Glor, and Wendell Challenger. 2008. GEIGER: investigating evolutionary radiations. Bioinformatics 24:129-131.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.