HWLratio {HardyWeinberg}R Documentation

Likelihood ratio test for Hardy Weinberg equilibrium

Description

HWLratio performs the Likelihood ratio test for Hardy Weinberg equilibrium.

Usage

HWLratio(X, verbose = FALSE)

Arguments

X X a vector containing the genotypic counts (AA,AB,BB).
verbose verbose = 1 prints results, verbose = 0 is silent.

Value

HWLratio returns a list with the components:

Lambda the likelihood ratio
G2 -2*log(Lambda)
pval the p-value

Author(s)

Jan Graffelman jan.graffelman@upc.edu

References

Weir, B.S. (1996) Genetic data analysis II. Sinauer Associates, Massachusetts. See Chapter 3.

See Also

HWChisq

Examples

x <- c(298,489,213)
names(x) <- c("MM","MN","NN")
HW.test <- HWLratio(x,verbose=TRUE)

[Package HardyWeinberg version 1.3 Index]