There is a newer version of the record available.

Published December 16, 2025 | Version v2.0.0

merliseclyde/BAS: BAS 2.0.0

  • 1. Duke University
  • 2. University of Amsterdam
  • 3. Whispp

Description

Features

  • in function bas.lm() and bas.glm() replace use of non-API call to SETLENGTH for MCMC sampling with new C function resizeVectors to truncate when overallocated (closes issue #82). This should reduce memory allocation for large problems when n.models was 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 the C function resizeVectors based on the R internal function xlenghtgets, but uses memcpy to copy the data to the new vector for efficiency in the case of real and integer SEXP vectors.

  • in bas.lm() and bas.glm, added logical option GROW" for method = "MCMC", to allow output vectors to grow as needed (closes issue #91) rather than over-allocating based on n.modelsand truncating. This should reduce memory usage when the number of unique models visited is much smaller than the default forn.models. Additional options expandandn.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.lm and bas.glm, MCMC sampling now stops after MCMC.iterations, even if n.models is reached, improving estimation based on MCMC frequencies.

Bug Fixes

  • R2 is 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.

Files

merliseclyde/BAS-v2.0.0.zip

Files (1.1 MB)

Name Size Download all
md5:597280baad5a28d492eb1aa35732389a
1.1 MB Preview Download

Additional details

Related works

Is supplement to
Software: https://github.com/merliseclyde/BAS/tree/v2.0.0 (URL)

Software