HWCondProbAB {HardyWeinberg} | R Documentation |
Compute probability of a genotypic sample
Description
Computes the probability of a particular genotypic sample given the
allele count, sample size and number of heterozygotes.
Usage
HWCondProbAB(n, nA, nAB)
Arguments
n |
n is the total sample size (total number of individuals) |
nA |
nA is the number of A alleles in the sample |
nAB |
nAB is the number of heterozygotes in the sample |
Value
p |
probability of the particular sample |
Author(s)
Jan Graffelman (jan.graffelman@upc.edu)
See Also
HWExact
Examples
x <- c(298,489,213)
names(x) <- c("MM","MN","NN")
n <- sum(x)
nM <- 2*x[1]+x[2]
nMN <- x[2]
p <- HWCondProbAB(n,nM,nMN)
[Package
HardyWeinberg version 1.3
Index]