richarddmorey / BayesFactor

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

meta.ttest.tstat sometimes returns interval probabilities greater than 1 #17

Closed richarddmorey closed 10 years ago

richarddmorey commented 10 years ago

In extreme cases, where an interval hypothesis is highly consistent with the data, the Bayes factor returned is NaN:

> t = c(-.15,2.39,2.42,2.43)
> N = c(100,150,97,99)
> meta.ttest.tstat(t,n1=N,nullInterval = c(0,Inf),rscale=1)
$bf
null     alt 
3.65618     NaN 

$properror
null          alt 
0.0001029407 0.1725509594 

The following warning is given:

Warning message:
In log(complArea) : NaNs produced

This is caused by the extremely small amount of posterior area for the hypothesis in question.