zsegarray | R Documentation |
Obtains offspring genotype probabilities given parental probabilities, the ploidy of the species, and the overdispersion parameter, for all possible parental genotypes.
zsegarray(alpha, ploidy)
alpha |
A numeric vector containing the double reduction parameter(s).
This should be a
vector of length |
ploidy |
The ploidy of the species. This should be an even positive integer. |
An array of probabilities. Element (i, j, k) contains the probability of offspring dosage k-1 given parental dosages i-1 and j-1.
David Gerard
ploidy <- 10
alpha <- c(0.5, 0.1)
p1 <- 4
p2 <- 3
segarray <- zsegarray(alpha = alpha, ploidy = ploidy)
graphics::plot(x = 0:10,
y = segarray[p1 + 1, p2 + 1, ],
type = "h",
ylab = "Pr(dosage)",
xlab = "dosage")
graphics::mtext(paste0("P1 dosage = ",
p1,
", ",
"P2 dosage = ",
p2))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.