richarddmorey / BayesFactor

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

meta.ttestBF 't is large; approximation invoked' #117

Closed SaoirseConnorDesai closed 6 years ago

SaoirseConnorDesai commented 6 years ago

I've used the meta.ttestBF function to t-statistics from two different experiments, with different sample sizes, and different results. Before providing me with the Bayes factor analysis I get a message saying 't is large; approximation invoked'.

I've done a search but can't find out what exactly is approximated and how this might affect the analysis.

I noticed that where the standard error of the BF is usually it says 'NA'.

The documentation doesn't mention anything about this so it would be great if you could clarify.

richarddmorey commented 6 years ago

When t is very large, the typical gaussian quadrature will fail and so BayesFactor uses a t(df) approximation to the posterior. You can find the approximation here: https://github.com/richarddmorey/BayesFactor/blob/6e69b0b0694671ca9b7b46fae54cfecd6ec587df/pkg/BayesFactor/R/meta-ttest-utility.R#L203-L235