Skip to content

Commit

Permalink
Bug in equivalente_test when using big numbers for lower bounds
Browse files Browse the repository at this point in the history
Fixes #982
  • Loading branch information
strengejacke committed Jul 20, 2024
1 parent ffe468a commit e9eaaba
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions R/equivalence_test.R
Original file line number Diff line number Diff line change
Expand Up @@ -562,13 +562,13 @@ equivalence_test.ggeffects <- function(x,
# significant result?
if (min(ci_narrow) > 0 || max(ci_narrow) < 0) {
# check if CI are entirely inside ROPE. If CI crosses ROPE, reject H0, else accept
if (min(abs(ci_narrow)) < max(abs(range_rope)) && max(abs(ci_narrow)) < max(abs(range_rope))) {
if (all(ci_narrow < max(range_rope)) && all(ci_narrow > min(range_rope))) {
decision <- "Accepted"
} else {
decision <- "Rejected"
}
# non-significant results
} else if (min(abs(ci_narrow)) < max(abs(range_rope)) && max(abs(ci_narrow)) < max(abs(range_rope))) {
} else if (all(ci_narrow < max(range_rope))) {
# check if CI are entirely inside ROPE. If CI crosses ROPE, reject H0, else accept
decision <- "Accepted"
} else {
Expand Down

0 comments on commit e9eaaba

Please sign in to comment.