BAS 2.0.0
Features
-
in function
bas.lm()andbas.glm()replace use of non-API call toSETLENGTHfor MCMC sampling with
new C functionresizeVectorsto truncate when overallocated (closes issue #82). This should reduce memory allocation
for large problems whenn.modelswas much larger than needed, as the longer vectors are available for
garbage collection, although there may be a slight increase in memory usage while copying the to the new vector. This
uses theCfunctionresizeVectorsbased on theRinternal functionxlenghtgets, but usesmemcpyto copy the
data to the new vector for efficiency in the case of real and integer SEXP vectors. -
in
bas.lm()andbas.glm, added logical optionGROW"formethod = "MCMC", to allow output vectors to grow as needed (closes issue #91) rather than over-allocating based onn.modelsand truncating. This should reduce memory usage when the number of unique models visited is much smaller than the default forn.models. Additional optionsexpandandn.models.initcontrol the growth rate and initial size of the output vectors. By default,GROW = TRUE,expand = 1.25andn.models.init = 2500`. See documentation for more details. -
in
bas.lmandbas.glm, MCMC sampling now stops afterMCMC.iterations, even ifn.modelsis reached,
improving estimation based on MCMC frequencies.
Bug Fixes
-
R2is calculated correctly in models where the number of columns in the design matrix was greater than
n, but the model was full rank. Closes issue #96 reported by A. Womack. -
Fixes issues #97 reported by A. Womack where the truncated Poisson and truncated power prior probabilities
did not account for the number of models of a given size.