Function to obtain the MLEs of parameters under the HWE, single *f* and saturated models. For the single *f* model numerical maximization is required if *k>2*, where *k* is the number of alleles.

1 | ```
HWEmodelsMLE(nvec)
``` |

`nvec` |
vector of genotype frequencies in the order |

`phat` |
matrix of |

`qhat` |
MLEs of |

`fqhat` |
MLEs of |

`fsingle` |
MLE of single |

`fmaxloglik` |
maximized log-likelihood (without the normalizing constant), under the single |

`fmin` |
estimated lower bound of |

Jon Wakefield (jonno@u.washington.edu)

Wakefield, J. (2010). Bayesian methods for examining Hardy-Weinberg equilibrium. Biometrics; Vol 66:257-65

Weir, B.S. (1996). Genetic Data Analysis II. Sunderland MA: Sinauer.

1 2 | ```
data(DiabRecess)
HWEmodelsMLE(nvec=DiabRecess)
``` |

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.