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

beta.prime prior not updating value of n in bas.glm #29

Closed merliseclyde closed 6 years ago

merliseclyde commented 6 years ago

REPREX:

 data(Pima.tr, package = "MASS")
  pima.BAS <- bas.glm(type ~ .,
                      data = Pima.tr, n.models = 2^7, method = "BAS",
                      betaprior = beta.prime(n=200), family = binomial(),
                      modelprior = uniform()
  )   #OK

pima.BAS <- bas.glm(type ~ .,
                      data = Pima.tr, n.models = 2^7, method = "BAS",
                      betaprior = beta.prime(), family = binomial(),
                      modelprior = uniform()
# default n=NULL leads to error in C code 

Identified in tests/testthat/test-bayes_glm.R "beta.prime prior for GLM"