HWEDirichBF2 {HWEBayes}R Documentation

Evaluates the Bayes factor in the k=2 allele case under conjugate priors

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

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. (2009). Bayesian methods for examining Hardy-Weinberg equilibrium. Biometrics.

See Also

DirichNormHWE, DirichNormSat, DirichSampHWE, DirichSampSat, HWETriangBF2, TriangNormHWE

Examples

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

[Package HWEBayes version 1.0 Index]