Estimates the probability of a gamete dosage given the parent dosage
(G), the parent ploidy (ploidy), and the double reduction
parameter (alpha). This is for biallelic loci.
Usage
dgamete(x, alpha, G, ploidy, log_p = FALSE)
Value
A vector of length length(x), containing the (log)
probabilities of a gamete carrying a dosage of x from a
parent of dosage G who has ploidy ploidy and a
double reduction rate alpha.
Arguments
x
A vector of numerics in seq(0, ploidy/2). The dosage of the
gametes.
alpha
A numeric vector containing the double reduction parameter(s).
This should be a
vector of length floor(ploidy/4) where alpha[i]
is the probability of exactly i pairs of IBDR alleles
being in the gamete. Note that sum(alpha) should be less than
1, as 1 - sum(alpha) is the probability of no double reduction.
G
The dosage of the parent. Should be an integer between 0
and ploidy.
ploidy
The ploidy of the species. This should be an even positive
integer.
log_p
A logical. Should we return the log-probability (TRUE)
or not (FALSE)? Defaults to FALSE.