HWExact {HardyWeinberg}R Documentation

Exact test for Hardy-Weinberg equilibrium

Description

HWExact performs an exact test for Hardy-Weinberg equilibrium

Usage

HWExact(X, singleterms = FALSE, alternative = "two.sided", sorting =
"probability", verbose = FALSE)

Arguments

X vector of genotype counts AA,AB,BB
singleterms print probabilities and statistics for all possible samples (by default FALSE)
alternative "two.sided" is the only option allowed so far
sorting sort samples by their probability (sorting = "probability") or by the number of heterozygotes
verbose print test results or not.

Value

D deviation from independence
pval p-value of the exact test
pofthesample probability of the observed sample

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

HWLratio

Examples

x <- c(298,489,213)
names(x) <- c("MM","MN","NN")
HW.test <- HWExact(x)

[Package HardyWeinberg version 1.3 Index]