Skip to content

Commit

Permalink
Merge pull request #1 from tony-stone/check-interval-widths-checks
Browse files Browse the repository at this point in the history
Update mcmc-intervals.R
  • Loading branch information
tony-stone authored Mar 6, 2023
2 parents 621d52a + 8a8fdd3 commit 4d1558b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions R/mcmc-intervals.R
Original file line number Diff line number Diff line change
Expand Up @@ -864,6 +864,8 @@ compute_interval_density <- function(x, interval_width = 1, n_dens = 1024,
}

check_interval_widths <- function(prob, prob_outer) {
if (!(is.numeric(prob) && is.numeric(prob_outer)))
abort("`prob` and `prob_outer` must be numeric")
if (prob < 0 || prob > 1 || prob_outer < 0 || prob_outer > 1)
abort("`prob` and `prob_outer` must be in [0,1].")
if (prob_outer < prob) {
Expand Down

0 comments on commit 4d1558b

Please sign in to comment.