dgamete {hwep} | R Documentation |
Gamete dosage probability
Description
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)
Arguments
x |
A vector of numerics in |
alpha |
A numeric vector containing the double reduction parameter(s).
This should be a
vector of length |
G |
The dosage of the parent. Should be an integer between |
ploidy |
The ploidy of the species. This should be an even positive integer. |
log_p |
A logical. Should we return the log-probability ( |
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
.
Author(s)
David Gerard
Examples
dgamete(x = 0:2, alpha = 0, G = 2, ploidy = 4)