Function to evaluate the Bayes factor *\Pr(n|\mbox{ HWE })/\Pr(n|\mbox{ saturated model })* in the *k=2* allele case and with a conjugate (Dirichlet) priors under the saturated model and a "triangular" distribution under the null. the latter is the marginal prior distribution under the (1,1,1) Dirichlet prior under the saturated model.

1 | ```
HWETriangBF2(nvec)
``` |

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

Bayes factor is returned.

Jon Wakefield (jonno@u.washington.edu)

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

1 | ```
HWETriangBF2(nvec=c(88,10,2))
``` |

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.