HWECC()
, which uses three other internal functions fun1()
, fun2()
, and fun3()
.
For example, for a SNP with case genotype counts 61, 48, 23 and control genotype counts 98, 77, 9, if the disease prevalence is 0.06, the p-value is obtained by calling
HWECC(prev=0.06, case=c(61,48,23), control=c(98,77,9))
The paper that describes the method is:
Li M, Li C (2008) Assessing departure from Hardy-Weinberg equilibrium in the presence of disease association. Genetic Epidemiology 32:589-599 (PMID: 18449919) (paper)