merliseclyde / BAS

BAS R package https://merliseclyde.github.io/BAS/
https://merliseclyde.github.io/BAS/
GNU General Public License v3.0
41 stars 16 forks source link

diagnostic plot error for bas.glm objects #28

Closed merliseclyde closed 5 years ago

merliseclyde commented 6 years ago

When using MCMC, the length of the MCMC estimates of the posterior inclusion probabilities is the number of models. This leads to an error in the diagnostic plot function.

REPREX:

data(Pima.tr, package = "MASS")
pima.MCMC <- bas.glm(type ~ .,
    data = Pima.tr, MCMC.iterations = 2^10,
    method = "MCMC", betaprior = aic.prior(),
    family = binomial(),
    modelprior = tr.poisson(ncol(Pima.tr) - 1, 7)
  )
  expect_null(diagnostics(pima.MCMC, type = "pip"))

In tests/testthat/test-bas_glm.R