HWLratio {HardyWeinberg} | R Documentation |
HWLratio
performs the Likelihood ratio test for Hardy Weinberg equilibrium.
HWLratio(X, verbose = FALSE)
X |
X a vector containing the genotypic counts (AA,AB,BB). |
verbose |
verbose = 1 prints results, verbose = 0 is silent. |
HWLratio
returns a list with the components:
Lambda |
the likelihood ratio |
G2 |
-2*log(Lambda) |
pval |
the p-value |
Jan Graffelman jan.graffelman@upc.edu
Weir, B.S. (1996) Genetic data analysis II. Sinauer Associates, Massachusetts. See Chapter 3.
x <- c(298,489,213) names(x) <- c("MM","MN","NN") HW.test <- HWLratio(x,verbose=TRUE)