Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

HWCondProbAB

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

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)

HardyWeinberg

Statistical Tests and Graphics for Hardy-Weinberg Equilibrium

v1.7.2
GPL (>= 2)
Authors
Jan Graffelman [aut, cre], Christopher Chang [ctb], Xavi Puig [ctb], Jan Wigginton [ctb], Leonardo Ortoleva [ctb], William R. Engels [ctb]
Initial release
2021-04-28

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.