I evaluated the Bayes factor in the k=2 allele case with a "triangular" prior under the null as in the example in the help file:
HWETriangBF2(nvec=c(88,10,2)) [1] 0.4580336 When I swap the n11 entry and n22 entry of nvec, I received totally different Bayes factor: > > HWETriangBF2(nvec=c(2,10,88)) [1] 5.710153 > In my understanding, defining the genotype frequency as n11 or n22 are arbitrary. So I was expecting the same value of Bayes factor. This is the case for conjugate Dirichlet prior: >DirichNormHWE(nvec=c(88,10,2), c(1,1))/DirichNormSat(nvec=c(88,10,2), c(1,1,1)) [1] 1.542047 >DirichNormHWE(nvec=c(2,10,88), c(1,1))/DirichNormSat(nvec=c(2,10,88), c(1,1,1)) [1] 1.542047 Could you explain why the HWETriangBF2 is returining completely different values of Bayes Factor?? -- View this message in context: http://r.789695.n4.nabble.com/HWEBayes-swapping-the-homozygotes-genotype-frequencies-tp3886313p3886313.html Sent from the R help mailing list archive at Nabble.com. ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.