HWABO | R Documentation |
Function HWABO
takes four genotype counts ("A","B","AB","OO") and
estimates the three allele frequencies using the EM algorithm.
HWABO(x, p = c(1/3, 1/3, 1/3), maxiter = 50, tol = 1e-10, verbose = TRUE)
x |
a vector with genotype counts ("A","B","AB","OO"). |
p |
a vector with initial allele frequencies (by default (1/3,1/3,1/3)). |
maxiter |
maximum number of iterations. |
tol |
tolerance for convergence, 1e-10 by default |
verbose |
print iteration history or not. |
pn |
vector with estimated allele frequencies. |
It.hist |
iteration history with log-likelihood. |
expected |
expected genotype counts under HWE. |
Jan Graffelman jan.graffelman@upc.edu
af
x <- c(fA=182,fB=60,nAB=17,nOO=176)
al.fre <- HWABO(x)
#al2 <- HWABO(x,p=c(0.99,0.01,0.01),maxiter=25)
#al3 <- HWABO(x,p=c(0.01,0.99,0.01),maxiter=25)
#al4 <- HWABO(x,p=c(0.01,0.01,0.99),maxiter=25)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.