Tests Hardy-Weinberg equilibrium for a multiallelic gene by displaying plain and/or fully conditional P-values.
A lower triangular matrix of observed genotype counts.
Number of Monte-Carlo simulations desired. The default is 10,000.
Determines type of p-value returned. Choices are “plain”, “cond”, and “both”.
The observed genotype counts matrix does not have to be lower triangular, but the code is designed to only read the lower triangle. Thus, the entries in the upper triangle are irrelevant.
Determines the model distribution for the matrix of observed genotype counts by calling the function create.model() and calculates the empirical test statistics between the observed counts and the model counts. The test statistics are determined by calling the functions test.rms(), test.chisq(), and test.gsq(). Then, depending on the type of P-value requested, this function calls on HW.plain() and/or HW.cond() to return the requested P-values, which are calculated by Monte-Carlo simulations.
Returns plain and/or fully conditional P-values associated to the Root Mean Square, Chi-Square, and Log Likelihood-Ratio statistics.
Currently, this function will work properly only if the input genotype_count is a matrix or array.
Shubhodeep Mukherji <email@example.com>
"Testing Hardy-Weinberg equilibrium with a simple root-mean-square statistic" by Rachel Ward.
1 2 3 4 5 6