"Sun, Ying" asked:
I have a genotype data for both case and controls and would like to calculate the HW p-value. However, since the number of one genotype is 0, I got wierd result. Would someone help me to figure it out? Or confirm it's right? Thanks a lot.
...
HWE.exact(g1) Exact Test for Hardy-Weinberg Equilibrium data: g1 N11 = 71, N12 = 9, N22 = 0, N1 = 151, N2 = 9, p-value = 1
Yes, that is correct. Double check it by calculating the goodness-of-fit chi-square for the same hypothesis: p <- 151/160; q <- 1-p; 80*c(p^2,2*p*q,q^2) [1] 71.253125 8.493750 0.253125 ... David Duffy. -- | David Duffy (MBBS PhD) ,-_|\ | email: [EMAIL PROTECTED] ph: INT+61+7+3362-0217 fax: -0101 / * | Epidemiology Unit, Queensland Institute of Medical Research \_,-._/ | 300 Herston Rd, Brisbane, Queensland 4029, Australia GPG 4D0B994A v ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.