Learn R Programming

coala (version 0.7.2)

par_variation: Variable Parameters

Description

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.

Usage

par_variation(par, variance)

Arguments

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.

See Also

For parameters that are identical for all loci: parameter

Examples

Run this code
model <- coal_model(5, 10) +
  feat_mutation(par_variation(par_const(5), 10)) +
  sumstat_nucleotide_div()
simulate(model)

Run the code above in your browser using DataLab