HWEDirichBF2: Evaluates the Bayes factor in the k=2 allele case under...

Description Usage Arguments Value Author(s) References See Also Examples

Description

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.

Usage

1
HWEDirichBF2(nvec, bvec0, bvec1)

Arguments

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.

Value

Bayes factor is returned.

Author(s)

Jon Wakefield (jonno@u.washington.edu)

References

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

See Also

DirichNormHWE, DirichNormSat, DirichSampHWE, DirichSampSat, HWETriangBF2, TriangNormHWE

Examples

1
HWEDirichBF2(nvec=c(88,10,2),bvec0=c(1,1),bvec1=c(1,1,1))

HWEBayes documentation built on May 2, 2019, 11:07 a.m.