Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
strengejacke committed Sep 17, 2024
1 parent 22145f5 commit 202ad90
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions R/p_significance.R
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,16 @@ p_significance.lm <- function(x, threshold = "default", ci = 0.95, verbose = TRU
out <- result$out
posterior <- result$posterior

# calculate the ROPE range
if (all(threshold == "default")) {
# calculate the ROPE range - for multiple thresholds, we have to check
# each list element for "default", to replace it with the appropriate range
if (is.list(threshold)) {
threshold <- lapply(threshold, function(i) {
if (all(i == "default")) {
i <- bayestestR::rope_range(x, verbose = verbose)
}
i
})
} else if (all(threshold == "default")) {
threshold <- bayestestR::rope_range(x, verbose = verbose)
}

Expand Down

0 comments on commit 202ad90

Please sign in to comment.