Skip to content

Commit

Permalink
Suppress warning when sampling probabilities are 0 or 1 [Issue #25](#25)
Browse files Browse the repository at this point in the history
  • Loading branch information
merliseclyde committed Jul 24, 2018
1 parent b3e8ce6 commit 2959539
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@

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

## Other

* suppress `warning` when sampling probabilities are 1 or 0 and the number of models is decremented
[Issue #25](https://github.com/merliseclyde/BAS/issues/25)

# BAS 1.5.1 June 6, 2018

## Features
Expand Down
4 changes: 2 additions & 2 deletions R/bas.R
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@
deg = sum(initprobs >= 1) + sum(initprobs <= 0)
if (deg > 1 & n.models == 2^(p - 1)) {
n.models = 2^(p - deg)
# warning(paste("There are", as.character(deg),
# "degenerate sampling probabilities (0 or 1); decreasing the number of models to", as.character(n.models)))
# # warning(paste("There are", as.character(deg),
# # "degenerate sampling probabilities (0 or 1); decreasing the number of models to", as.character(n.models)))
}

if (n.models > 2^30) stop("Dimension of model space is too big to enumerate\n Rerun with a smaller value for n.models or use MCMC")
Expand Down

0 comments on commit 2959539

Please sign in to comment.