# Computing the fully conditional P-value for a given lower-triangular array of genotype counts

### Description

Computes the fully conditional P-Value associated to the provided lower-triangular array of genotype counts to be consistent with the Hardy-Weinberg equilibrium model

### Usage

1 | ```
HW.cond(obs_dist, model_dist, rms, chisq, gsq, T, n)
``` |

### Arguments

`obs_dist` |
Observed genotype count matrix |

`model_dist` |
Hardy-Weinberg equilibrium model distribution for the observed genotype count matrix determined in HW.pval(). Calculated via the function create.model() |

`rms` |
Root-Mean-Square test statistic determined in HW.pval() |

`chisq` |
Chi-Square test statistic determined in HW.pval() |

`gsq` |
Log Likelihood-Ratio test statistic determined in HW.pval() |

`T` |
Number of Monte-Carlo simulations desired |

`n` |
Total number of observed genotypes |

### Details

Determines the fully-conditional P-value via Monte-Carlo simulation as described in Algorithm 5.2 of the referenced paper

Returns fully conditional P-values associated to the root-mean-square, chi-square, and log likelihood-ratio statistics.

### Author(s)

Shuhodeep Mukherji <deep.mukherji@utexas.edu>

### References

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

### See Also

`HW.pval`

, `create.model`

, `test.rms`

, `test.chisq`

, and `test.gsq`