From e9eaabad4b095b1f73f1c41cb3c05b186e895579 Mon Sep 17 00:00:00 2001 From: Daniel Date: Sat, 20 Jul 2024 14:24:29 +0200 Subject: [PATCH] Bug in equivalente_test when using big numbers for lower bounds Fixes #982 --- R/equivalence_test.R | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/R/equivalence_test.R b/R/equivalence_test.R index 1f5c9cab0..3e23b6470 100644 --- a/R/equivalence_test.R +++ b/R/equivalence_test.R @@ -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 {