merliseclyde / BAS

BAS R package for Bayesian Model Averaging and Variable Selection
https://merliseclyde.github.io/BAS/
GNU General Public License v3.0
41 stars 16 forks source link

errors with intrinsic prior #30

Closed merliseclyde closed 6 years ago

merliseclyde commented 6 years ago

REPREX

test_that("intrinsic prior for GLM", {
  data(Pima.tr, package = "MASS")
  expect_error( pima.BAS <- bas.glm(type ~ .,
                      data = Pima.tr, n.models = 2^7, method = "BAS",
                      betaprior = intrinsic(n = nrow(Pima.tr)), family = binomial(),
                      modelprior = uniform()
  ))
#  expect_equal(0, sum(pima.BAS$shrinkage > 1))
})

Error in bas.glm(type ~ ., data = Pima.tr, n.models = 2^7, method = "BAS", : REAL() can only be applied to a 'numeric', not a 'integer'