View source: R/sim_multiphylo.R
sim_multiphylo | R Documentation |
Simulates evolution using Lande's multivariate breeder's equation.
sim_multiphylo(
G,
phy,
n.s,
selection = "random",
efsize = 0,
gen_time = 1e-06,
Nef = 1000,
Nef_osc = "no",
matrix = TRUE,
Nef_par = NULL,
scale = FALSE,
means = NULL
)
G |
matrix kxk for k number of traits. |
phy |
a phylogenetic tree. Must be of class 'phylo'. |
n.s |
a vector indicating the sample sizes for each terminal. |
selection |
define the type oif selection "random" or numeric between 1 and k. |
efsize |
strenght of selection relative to drif. Must be |
gen_time |
generation time in the same time unity as the phylogenetic tree (usually MY). |
Nef |
effective population size for initial population. Must be >= 1. |
Nef_osc |
oscilation in effective population size (Nef) over time. Character "no", "norm", or "unif". |
matrix |
logic TRUE of FALSE. Should the output be a set of marices? See 'Value' for more details. |
Nef_par |
set parameters for the oscilation of effective population size (Nef). |
scale |
logic TRUE of FALSE. Should the matrices be scaled to the empirical character values (means)? |
means |
matrix sxk containing the empirical means of all k characters for each species (s). Default = NULL. |
The 'sim_multiphylo' function returns an object of class "list". This is a list of items of class "matrix", all kxk. If 'matrix' = TRUE, the function returns 5 variance covariance matrices:
Evolutionary rate matrix. Describes the rate of evolution and co-evolution among characters. Diagonal contains traits' rate evolution according to Brownian-Motion, off diagonals represent traits co-evolution.
Within matrix. Pooled-within species' trait variance-covariance matrix.
Between matrix. Variance-vovariance between average species traits.
Genetic matrix. The original aditive variance-covariance G matrix imputed.
Selection matrix. The expected effect due to selection.
If 'matrix' = FALSE, the function returns 3 matrices:
Simulated trait values for species averages.
Simulated intraspecific error.
the original aditive variance-covariance G matrix imputed.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.