From ef5a7392880bcd8f6818e3758eced7bfb28f214c Mon Sep 17 00:00:00 2001 From: merliseclyde Date: Sun, 25 Mar 2018 13:06:21 +0200 Subject: [PATCH] fixed issue raised in CRAN checks https://www.r-project.org/nosvn/R.check/r-devel-linux-x86_64-fedora-gcc/BAS-00install.html --- NEWS.md | 3 ++- src/betapriorfamily.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/NEWS.md b/NEWS.md index 242fde4c..ad00d640 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,8 +1,9 @@ -# BAS 1.4.9 March 19, 2018 +# BAS 1.4.9 March 24, 2018 ## Bugs * fixed bug in `confint.coef.bas` when parm is a character string +* added parentheses in betafamily.c line 382 as indicated in CRAN check for R devel ## Features diff --git a/src/betapriorfamily.c b/src/betapriorfamily.c index 2d1f7904..b7916f67 100644 --- a/src/betapriorfamily.c +++ b/src/betapriorfamily.c @@ -379,7 +379,7 @@ double EB_local_glm_logmarg(SEXP hyperparams, int pmodel, double W, ghat = fmax(0.0, W/p - 1); logmarglik = loglik_mle + M_LN_SQRT_2PI - 0.5* logdet_Iintercept; - if (p >= 1.0 & ghat > 0) { + if ((p >= 1.0) & (ghat > 0)) { logmarglik += -.5*p*log(1.0 + ghat) -.5*W/(1.0 + ghat); } return(logmarglik);