richarddmorey / BayesFactor

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

generalTestBF() problem with particular analysis #45

Closed ghost closed 9 years ago

ghost commented 9 years ago

When I run the following analysis:

dataset <- read.csv("ssgo-fred.csv")
library(BayesFactor) #version 0.9.9
generalTestBF(block ~ trialNo + difficulty, dataset)

using the "ssgo-fred.csv" dataset, generalTestBF throws the following error:

Error in integrate(integrand.regression, lower = 0, upper = Inf, N = N,  : 
  non-finite function value
In addition: Warning message:
In log(x) : NaNs produced

I will email you the ssgo-fred.csv dataset.

richarddmorey commented 9 years ago

These effects are really tiny, which means that the mass of the integrand is gathered around 0 and the integration has difficulties. I'll see what I can do to fix/work around it.

richarddmorey commented 9 years ago

This particular analysis is artificial. I tested the regression Bayes factor function with R^2 down to 5.298348e-07, and it craps out just below that. I'm not sure this is really a priority, due to the fact that it only his very unrealistic data and will require application of a new integration method to fix.