# Testing Hardy-Weinberg Equilibrium for Multiallelic Genes

### Description

Tests Hardy-Weinberg equilibrium for a multiallelic gene by displaying plain and/or fully conditional P-values.

### Usage

1 |

### Arguments

`genotype_count` |
A lower triangular matrix of observed genotype counts. |

`num_simulations` |
Number of Monte-Carlo simulations desired. The default is 10,000. |

`type` |
Determines type of p-value returned. Choices are “plain”, “cond”, and “both”. |

### Details

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.

### Value

Returns plain and/or fully conditional P-values associated to the Root Mean Square, Chi-Square, and Log Likelihood-Ratio statistics.

### Note

Currently, this function will work properly only if the input genotype_count is a matrix or array.

### Author(s)

Shubhodeep Mukherji <deep.mukherji@utexas.edu>

### References

"Testing Hardy-Weinberg equilibrium with a simple root-mean-square statistic" by Rachel Ward.

### See Also

`HW.pval-package`

, `HW.plain`

, `HW.cond`

, `create.model`

, `test.rms`

, `test.chisq`

, and `test.gsq`

.

### Examples

1 2 3 4 5 6 |