Closed merliseclyde closed 2 years ago
Fixed as of BS 1.6.2
Note
BAS::phi1(1, 2, 1.5, 1000, 1/100, log=FALSE)
still returns Inf
Use
BAS::phi1(1, 2, 1.5, 1000, 1/100, log=TRUE)
as the result is greater that the largest double for exponentiating
Describe the bug For large values of the Wald statistic (typical with large n) the current implementation of the Phi1 function in BAS returns NA or Inf due to overflow in the exponential function. This impacts Bayes factor calculations with several prior distributions in
bas.glm
, such as thehyper-g/n
To Reproduce Steps to reproduce the behavior:
BAS::phi1(1, 2, 1.5, 1000, 1/100)
Reported by Daniel Heeman