Skip to content

Releases: merliseclyde/BAS

BAS 1.7.3

18 Sep 02:47
Compare
Choose a tag to compare

BAS 1.7.3 introduces a new Independent Adaptive MCMC algorithm for bas.lm that can be used a proposal distribution for sampling models with replacement and estimation of posterior model probabilities via Importance sampling and Horvitz-Thomposon estimators and their Bayesian Finite Population estimators. See details in bas.lm with `method="AMCMC".

DOI

BAS_1.7.3.tar.gz

BAS 1.7.2

17 Sep 01:16
Compare
Choose a tag to compare

Updated package provides a new adaptive independent MCMC sampler that allows more accurate estimates of model probabilities and other quantities using the Horvitz-Thompson estimator and Bayesian analogs for finite population sampling

Full Changelog: v1.7.1...v1.7.2

BAS 1.7.1

06 Dec 13:52
Compare
Choose a tag to compare

Minor Improvements and Fixes

  • Initialized vector se via memset and disp = 1.0 in fit_glm.c (issue #72)

  • Initialized variables in hyp1f1.c from testthat (issue #75)

  • Removed models that have zero prior probability in bas.lm and bas.glm (issue #74)

  • Fixed error in bayesglm.fit to check arguments x or y for correct type before calling C and added unit test (issue #67)

BAS 1.6.6

29 Nov 00:27
Compare
Choose a tag to compare

New Features

  • Added support for Gamma regression for bas.glm, with unit tests and
    example (Code contributed by @betsyberrson)

Minor Improvements and Fixes

  • added error if supplied initial model for the bas.lm sampling methods "MCMC" and "MCMC+BAS" had prior probability zero.

  • fixed printing problems as identified via checks

  • fixed indexing error for bas.lm and method = "MCMC+BAS" as bas.lm using method = "MCMC+BAS" crashed with a segmentation fault if bestmodel is not NULL or the null model. GitHub issue #69

  • fixed error in predict.bas with se.fit=TRUE if there is only one predictor. GitHub issue #68 reported by @AleCarminati
    added unit test to test-predict.R

  • Fixed error in coef for bas.glm objects when using a betaprior of class
    IC, including AIC and BIC Github issue #65

  • Fixed error when using Jeffreys prior in bas.glm with the
    include.always option and added unit test in test-bas-glm.R.
    Github issue #61

  • Fixed error for extracting coefficients from the median probability model
    when a formula is passed as an object rather than a literal, and added
    a unit test to test-coefficients.R Github issues #39 and #56

v1.6.4

08 Nov 20:58
Compare
Choose a tag to compare
Latest release for CRAN

BAS version 1.6.2

27 Apr 14:29
Compare
Choose a tag to compare

Release for updates with R 4.2.0

Major change is improved behavior for CCH and related priors in bas.glm that use the phi1 function. Alternative formulations for computing the marginal likelihoods show add improved stability and eliminate/reduce NA and Inf in computations as reported in Issue #55

BAS version 1.6.0

14 Nov 21:47
Compare
Choose a tag to compare

Changes

  • update Fortran code to be compliant with USE_FC_LEN_T for character strings

Bug Fixes

  • fixed warning in src code for log_laplace_F21 which had an uninitialized variable
    leading to NaN being returned from R function hypergeometric2F1

BAS Version 1.5.5

27 Jan 03:12
Compare
Choose a tag to compare

This version of the package provides some minor bug fixes and addresses some memory issues identified in CRAN checks.

  • Changed the default in bas.lm and bas.glm to force.heredity=FALSE (triggered by errors with Solaris).

  • Modified prior probabilities to adjust for the number of variables always
    included when using include.always. Pull request #41 by Don van de Bergh. Issue #40

  • Added contrast=NULL argument to bas.lm and bas.glm so that non-NULL contrasts do not
    trigger warning in model.matrix as of R 3.6.0. Bug #44

  • Added check for sample size equal to zero due to subsetting or missing data
    Bug #37

BAS Version 1.5.3

30 Oct 16:56
Compare
Choose a tag to compare

This release fixes errors identified on CRAN for fedora with clang (there are still remaining problems with debian/clang and solaris)

Bug Fixes

Fixed errors identified on cran checks https://cran.r-project.org/web/checks/check_results_BAS.html

  • initialize R2_m = 0.0 in lm_mcmcbas.c (lead to NA's with clang on debian and fedora )

  • switch to default of pivot = TRUE in bas.lm, adding tol as an argument to control tolerance in cholregpovot for improved stability across platforms with singular or nearly singular designs.

  • valgrind messages: Conditional jump or move depends on uninitialised value(s). Initialize vectors allocated via R_alloc in lm_deterministic.c and glm_deterministic.c.

BAS Version 1.5.2

25 Oct 21:53
Compare
Choose a tag to compare

BAS 1.5.2

Features

  • Included an option pivot=TRUE in bas.lm to fit the models using a pivoted Cholesky decomposition to allow models that are rank-deficient. Enhancment #24 and Bug #21. Currently coefficients that are not-estimable are set to zero so that predict and other methods will work as before. With more testing and timing this may become the default; otherwise the default method without pivoting issues a warning if log marginals are NA. The vector rank is added to the output (see documenation for bas.lm) and the degrees of freedom methods that assume a uniform prior for obtaining estimates (AIC and BIC) are adjusted to use rank rather than size.

  • Added option force.heredity=TRUEto force lower order terms to be included if higher order terms are present (hierarchical constraint) for method='MCMC' and method='BAS' with bas.lm and bas.glm. Updated Vignette to illustrate. enhancement #19. Checks to see if parents are included using include.always pass issue #26.

  • Added option drop.always.included to image.bas so that variables that are always included may be excluded from the image. By default all are shown enhancement #23

  • Added option drop.always.included and subset to plot.bas so that variables that are always included may be excluded from the plot showing the marginal posterior inclusion probabilities (which=4). By default all are shown enhancement #23

  • update fitted.bas to use predict so that code covers both GLM and LM cases with type='link' or type='response'

  • Updates to package for CII Best Practices certification

  • Added Code Coverage support and more extensive tests using test_that.

Bugs

  • fixed issue #36 Errors in prior = "ZS-null" when R2 is not finite or out of range due to model being not full rank. Change in gexpectations function in file bayesreg.c

  • fixed issue #35 for method="MCMC+BAS" in bas.glm in glm_mcmcbas.c when no values are provided for MCMC.iterations or n.models and defaults are used. Added unit test in test-bas-glm.R

  • fixed issue #34 for bas.glm where variables in include.always had marginal inclusion probabilities that were incorrect. Added unit test in test-bas-glm.R

  • fixed issue #33 for Jeffreys prior where marginal inclusion probabilities were not renomalized after dropping intercept model

  • fixed issue #32
    to allow vectorization for phi1 function in R/cch.R
    and added unit test to "tests/testthat/test-special-functions.R"

  • fixed issue #31 to coerce g to be a REAL for g.prior prior and IC.prior in bas.glm; added unit-test "tests/testthat/test-bas-glm.R"

  • fixed issue #30 added n as hyperparameter if NULL and coerced to be a REAL for intrinsic prior in bas.glm; added unit-test

  • fixed issue #29 added n as hyperparameter if NULL and coerced to be a REAL for beta.prime prior in bas.glm; added unit-test

  • fixed issue #28 fixed length of MCMC estimates of marginal inclusion probabilities; added unit-test

  • fixed issue #27 where expected shrinkage with the JZS prior was greater than 1. Added unit test.

  • fixed output include.always to include the intercept issue #26 always so that drop.always.included = TRUE drops the intercept and any other variables that are forced in. include.always and force.heredity=TRUE can now be used together with method="BAS".

  • added warning if marginal likelihoods/posterior probabilities are NA with default model fitting method with suggestion that models be rerun with pivot = TRUE. This uses a modified Cholesky decomposition with pivoting so that if the model is rank deficient or nearly singular the dimensionality is reduced. Bug #21.

  • corrected count for first model with method='MCMC' which lead to potential model with 0 probabiliy and errors in image.

  • coerced predicted values to be a vector under BMA (was a matrix)

  • fixed size with using method=deterministic in bas.glm (was not updated)

  • fixed problem in confint with horizontal=TRUE when intervals are point mass at zero.

Other

  • suppress warning when sampling probabilities are 1 or 0 and the number of models is decremented
    Issue #25

  • changed force.heredity.bas to renormalize the prior probabilities rather than to use a new prior probability based on heredity constraints. For future, add new priors for models based on heredity. See comment on issue #26.

  • Changed License to GPL 3.0