richarddmorey / BayesFactor

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

whichModels = "top" throws error for unifactorial models in anovaBF #72

Closed crsh closed 8 years ago

crsh commented 8 years ago

Hi Richard,

I think I just ran into a minor bug.

anovaBF(
  extra ~ group + ID
  , data = sleep
  , whichRandom = "ID"
  , whichModels = "top"
)

This throws the following error (translated from German):

Error in tempfile(rep("", n), "", "") : no 'pattern' provided

It appears the calculations are being run (the progress bar reaches 100%) but something breaks while assembling the S4 object. The culprit is whichModels = "top". Once I omit this it works. This also happens in unifactorial models without random effects.

anovaBF(
  extra ~ group
  , data = sleep
  , whichModels = "top"
)
richarddmorey commented 8 years ago

Thanks! I'll check it out and correct it for the next version.