View source: R/parameter_variation.R
par_variation | R Documentation |
This function can be used to let the values of a parameter vary between
the different loci. When used, the values for the enclosed parameter
will follow a gamma distribution with mean of the parameters original
value, and the variance specified as argument variance
. This requires
that the original value is positive. When using this, the simulators
are called separately for each locus, which can dramatically increase the
time needed to simulate models with many loci.
par_variation(par, variance)
par |
A parameter whichs value will be made variable between the loci. |
variance |
The variance of the gamma distribution, which the values used for simulation will follow. |
For parameters that are identical for all loci: parameter
model <- coal_model(5, 10) +
feat_mutation(par_variation(par_const(5), 10)) +
sumstat_nucleotide_div()
simulate(model)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.