stepwiseReversible {pedmut} | R Documentation |
Reversible stepwise mutation model
Description
A reversible stepwise mutation model is created following the approach of Dawid et al. (2002).
Usage
stepwiseReversible(alleles, afreq, rate, range, maxRateOnly = FALSE)
Arguments
alleles |
A vector of integer integers. |
afreq |
A numeric vector of allele frequencies. |
rate |
A numeric mutation rate. |
range |
A positive number. |
maxRateOnly |
A logical, by default FALSE. See Value. |
Details
For the stepwise reversible model, the mutation rate is proportional to the overall mutation rate
for given
values of the range, the allele frequency
and n, the number of
alleles. Hence, one can determine bounds UW and UB so that the model is well
defined if
and bounded, i.e.,
, if
, The bounds UW and UB are computed.
Value
A reversible stepwise mutation model with overall mutation rate equal
to rate
.
If maxRateOnly
is TRUE, the function returns a vector of two numbers
named UW
and UB
. The first of these is the maximum overall mutation
rate for a well-defined stepwise reversible mutation matrix with the given
input. The latter (UB) is the maximum rate under the additional restraint
that the model is bounded by afreq
.
Author(s)
Thore Egeland.
Examples
stepwiseReversible(alleles = 1:3,
afreq = c(0.2, 0.3, 0.5),
rate = 0.001,
range = 0.1)
stepwiseReversible(alleles = 1:3,
afreq = c(0.2, 0.3, 0.5),
range = 0.1,
maxRateOnly = TRUE)
# Model not well defined:
## Not run:
stepwiseReversible(alleles = 1:3,
afreq = c(0.2, 0.3, 0.5),
rate = 0.7,
range = 0.1)
## End(Not run)