HWEDirichBF2 {HWEBayes} | R Documentation |
Function to evaluate the Bayes factor Pr(n|mbox{ HWE })/Pr(n|mbox{ saturated model }) in the k=2 allele case and with conjugate (Dirichlet) priors under HWE and saturated models.
HWEDirichBF2(nvec, bvec0, bvec1)
nvec |
vector of genotype frequencies in the order n_{11}, n_{21}, n_{22}. |
bvec0 |
vector of length k=2 Dirichlet prior parameters for the prior under the null, where k is the number of alleles. |
bvec1 |
vector of length k(k+1)/2=3 Dirichlet prior parameters for the prior under the saturated model, where k is the number of alleles. |
Bayes factor is returned.
Jon Wakefield (jonno@u.washington.edu)
Wakefield, J. (2009). Bayesian methods for examining Hardy-Weinberg equilibrium. Biometrics.
DirichNormHWE
, DirichNormSat
, DirichSampHWE
, DirichSampSat
, HWETriangBF2
, TriangNormHWE
HWEDirichBF2(nvec=c(88,10,2),bvec0=c(1,1),bvec1=c(1,1,1))