Learn R Programming

coala (version 0.2.0)

par_zero_inflation: Zero inflation for Parameters

Description

This adds a zero inflation to the distribution of a parameter for the different loci. When using this, each locus will be simulated with a parameter value of 0 with probability prob, or with parameter's original value in the remaining cases. are called separately for each locus, which can dramatically increase the time needed to simulate models with many loci.

Usage

par_zero_inflation(par, prob, random = TRUE)

Arguments

par
A parameter whose value will be set variable.
prob
The probability that the parameters value will be set to `0` for each locus if random is TRUE. Otherwise, it's the fixed fraction of loci which will have a parameter value of `0`.
random
Whether the number of loci which are simulated with a value of `0` should be random (TRUE) or a fixed fraction (FALSE). See prob for details.