HWE.exact {GeneticsBase} | R Documentation |
Exact test for Hardy-Weinberg Equilibrium for a biallelic locus.
HWE.exact(object, marker, founderOnly=TRUE)
object |
a geneSet object. |
marker |
marker name for the biallelic locus. |
founderOnly |
Indicates if only founders are used to do the test. |
The function HWE
returns a list with class htest
containing the following elements:
statistic |
A 3-element vector records the genotype frequencies: N11 , N12 , N22 . |
parameter |
A 2-element vector records the allele frequencies: N1 and N2 |
p.value |
p-value of the test. |
method |
Information indicates if chisquare method or exact method is used to do HWE test. |
data.name |
name of the data set |
observed |
a table lists allele levels, allele pairs, and allele codes |
This function only works for genotypes with exactly 2 alleles.
David Duffy davidD@qimr.edu.au with modifications by Gregory R. Warnes, and Nitin Jain
Emigh TH. (1980) "Comparison of tests for Hardy-Weinberg Equilibrium", Biometrics, 36, 627-642.
library(GeneticsBase) data(CAMP) HWE.exact(CAMP, marker="m654")