HWStrata: Asymptotic test for HWE across strata for a single biallelic...

View source: R/HWStrata.R

HWStrataR Documentation

Asymptotic test for HWE across strata for a single biallelic marker

Description

Function HWStrata implements Olson's asymptotic test for HWE for a stratified sample of single biallelic polymorphism.

Usage

HWStrata(X, verbose = TRUE)

Arguments

X

A three-column matrix of genotype counts (e.g. with columns AA, AB, BB)

verbose

print output if verbose = TRUE

Details

See the references for the related homogeneity assumption.

Value

T2

The test statistic

pval

The p-value

Author(s)

Jan Graffelman jan.graffelman@upc.edu

References

Olson J.M. (1993) Testing the Hardy-Weinberg law across strata. Annals of Human Genetics 57(4):291-295.

Olson, J.M. and Foley, M. (1996) Testing for homogeneity of Hardy-Weinberg disequilibrium using data sampled from several populations. Biometrics 52(3) pp. 971-979.

See Also

HWExactStats, HWChisqStats

Examples

#
# Test across strata
#
data("Glyoxalase")
Glyoxalase <- as.matrix(Glyoxalase)
HWStrata(Glyoxalase)
#
# Stratified exact testing, testing each sample
#
HWExactStats(Glyoxalase)

HardyWeinberg documentation built on May 29, 2024, 6:17 a.m.