Learn R Programming

MCPerm (version 1.1.4)

HW.test: Hardy-weinberg equilibrium test

Description

Hardy-weinberg equilibrium test for control samples.

Usage

HW.test(count_11, count_12, count_22)

Arguments

count_11
a non-negative integer or vector, the frequency of genotype "allele1/allele1" in control samples.
count_12
a non-negative integer or vector, the frequency of genotype "allele1/allele2" in control samples.
count_22
a non-negative integer or vector, the frequency of genotype "allele2/allele2" in control samples.

Value

X2
statistic(s) for the Hardy-weinberg equilibrium test.
p.value
p.value(s) for the Hardy-weinberg equilibrium test.

Details

Hardy-weinberg equilibrium test states that allele and genotype frequencies in a population will remain constant from generation to generation in the absence of other evolutionary influences.

References

Emigh, T.H. (1980 Biometrics 36(4): 627-642): A comparison of tests for Hardy-weinberg equilibrium.

See Also

OR, OR.MCPerm, Armitage, Armitage.TradPerm, Armitage.MCPerm, chisq.test, chisq.TradPerm, chisq.MCPerm, fisher.test, fisher.TradPerm, fisher.MCPerm, meta, meta.TradPerm, meta.MCPerm, permuteGenotype, rhyper, permuteGenotypeCount, genotypeStat

Examples

Run this code
# case_11=c(12,23,34,33)
# case_12=c(4,34,53,4)
# case_22=c(7,5,23,9)
# HW.test(case_11,case_12,case_22)

Run the code above in your browser using DataLab