richarddmorey / BayesFactor

BayesFactor R package for Bayesian data analysis with common statistical models.
https://richarddmorey.github.io/BayesFactor/
132 stars 49 forks source link

Bayesian t-test for large samples #118

Closed DominiqueMakowski closed 6 years ago

DominiqueMakowski commented 6 years ago

I am trying to compare large normal distributions (n > 1000) to mu = 0. However, the bayes factor becomes quickly very large (or infinite), even though visually the distribution is relatively close to 0 (a large proportion of it overlaps 0 and the opposite side).

set.seed(123)
p <- rnorm(4000, -0.3, 0.50)
plot(density(p))
BayesFactor::ttestBF(p)

image

Is there any less sensitive alternatives? That would require larger deviations to consider evidence for alternative hypothesis?

Thanks

richarddmorey commented 6 years ago

I'm not sure what you mean; the Bayes factor is as sensitive as the method should be. For what it's worth, the p value is at the limit of numerical precision as well (<2.2e-16).

DominiqueMakowski commented 6 years ago

Alright it was the question that I asked that was wrong. Thanks for your answer :)