Skip to content

BAS 2.0.0

Choose a tag to compare

@merliseclyde merliseclyde released this 16 Dec 13:36

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.