Without really knowing this code, I can guess that it may be the
"triangular" prior at work.  Bayes Factors are notorious for being sensitive
to the prior.  Presumably, the prior somehow prefers to see the rarer allele
as the "BB", and not the "AA" homozygous genotype (this is a common
assumption: that AA is the reference, and thus the major, more frequent,
allele).

-Aaron

On Sat, Oct 8, 2011 at 7:52 PM, stat999 <yumik091...@gmail.com> wrote:

>  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.
>

        [[alternative HTML version deleted]]

______________________________________________
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.

Reply via email to