hwexact {hwde}R Documentation

Exact test of HWE

Description

This function implements an exact SNP test of Hardy-Weinberg equilibrium. It is a wrapper for snphwe

Usage

hwexact(obs.hom1, obs.hets, obs.hom2, data, loci, observed)

Arguments

obs.hom1

Observed number of individuals homozygous for the common allele.

obs.hets

Observed number of heterozygous individuals.

obs.hom2

Observed number of individuals homozygous for the rare allele.

data

If not NULL, specifies a data frame holding the data.

loci

If data is not NULL, column that holds some combination of symbols of the form AA, Aa and aa.

observed

Column that holds the frequencies, if data is not NULL.

Value

The exact p-value testing departure from Hardy-Weinberg Equilibrium, conditional on the observed relative numbers of alleles of the two types

Author(s)

Randall Johnson – adapted from code by Wigginton et al

References

Wigginton, J.E.; Cutler, D.J. & Abecasis, G.R.; A Note on exact tests of Hardy-Weinberg equilibrium; American Journal of Human Genetics, 2005, 76, 887-93

Examples

hwexact(68, 28, 4)

[Package hwde version 0.67-3 Index]