Test of Hardy–Weinberg Equilibrium
This function tests, for a series of loci, the hypothesis that
genotype frequencies follow the Hardy–Weinberg equilibrium.
hw.test is a generic with methods for the classes
"loci" and genind. Note that the latter
HWE.test.genind in the adegenet package.
1 2 3 4 5
an object of class
the number of replicates for the Monte Carlo procedure; for the regular HW test, set B = 0 (see details).
further arguments to be passed.
This test can be performed with any level of ploidy. Two versions
of the test are available: the classical chi^2-test based
on the expected genotype frequencies calculated from the allelic
frequencies, and an exact test based on Monte Carlo permutations of
alleles. For the moment, the latter version is available only for
B = 0 if you want to skip the second test.
A matrix with three or four columns with the chi^2-value,
the number of degrees of freedom, the associated P-value, and
possibly the P-value from the Monte Carlo test. The rows of
this matrix are the different loci in
Main code by Emmanuel Paradis; wrapper for genind objects by Thibaut Jombart.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16