HWExact {HardyWeinberg} | R Documentation |
HWExact
performs an exact test for Hardy-Weinberg equilibrium
HWExact(X, singleterms = FALSE, alternative = "two.sided", sorting = "probability", verbose = FALSE)
X |
vector of genotype counts AA,AB,BB |
singleterms |
print probabilities and statistics for all
possible samples (by default FALSE ) |
alternative |
"two.sided" is the only option allowed so far |
sorting |
sort samples by their probability (sorting =
"probability" ) or by the number of heterozygotes |
verbose |
print test results or not. |
D |
deviation from independence |
pval |
p-value of the exact test |
pofthesample |
probability of the observed sample |
Jan Graffelman (jan.graffelman@upc.edu)
Weir, B.S. (1996) Genetic data analysis II. Sinauer Associates, Massachusetts. See Chapter 3.
x <- c(298,489,213) names(x) <- c("MM","MN","NN") HW.test <- HWExact(x)