HWExact {HardyWeinberg}R Documentation

Exact test for Hardy-Weinberg equilibrium

Description

HWExact performs an exact test for Hardy-Weinberg equilibrium

Usage

HWExact(X, alternative = "two.sided", pvaluetype = "dost", verbose = FALSE)

Arguments

X vector with the genotype counts AA, AB, BB
alternative two.sided (default) will perform a two-sided test where both an excess and a dearth of heterozygotes count as evidence against HWE. less is a one-sided test where only dearth of heterozygotes counts a evidence against HWE, greater is a one-sided test where only excess of heterozygotes counts as evidence against HWE.
pvaluetype if pvaluetype is set to dost then the p-value of a two-sided test is computed as twice the tail area of a one-sided test. When set to selome, the p-value is computed as the sum of the probabilities of all samples less or equally likely as the current sample.
verbose print results or not.

Details

HWExact use the recursion equations described by Wigginton et. al.

Value

pval p-value of the exact test
pofthesample probability of the observed sample

Note

HWExact is designed for a fast analysis of a large set of markers. HWExact is slower, but provides more detailed statistics for the sample under study.

Author(s)

Jan Graffelman (jan.graffelman@upc.edu)

References

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

Wigginton, J.E., Cutler, D.J. and Abecasis, G.R. (2005) A note on exact tests of Hardy-Weinberg equilibrium, American Journal of Human Genetics (76) pp. 887-893.

See Also

HWLratio, HWChisq

Examples

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

[Package HardyWeinberg version 1.4 Index]