From 14f146d094ac70b0322f4887948a85b3fdd9dc14 Mon Sep 17 00:00:00 2001
From: Christian Hohenfeld <git@hohenfeld.is>
Date: Fri, 6 Jan 2023 08:29:33 +0100
Subject: [PATCH] Specify rope range hard as 0.1 * SD

---
 DESCRIPTION               | 2 +-
 R/compare_measure_group.R | 5 ++++-
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/DESCRIPTION b/DESCRIPTION
index ee79766..41b02f8 100644
--- a/DESCRIPTION
+++ b/DESCRIPTION
@@ -1,6 +1,6 @@
 Package: rsAnalysis
 Title: High-Level Tools for rsfMRI analysis
-Version: 0.4.6
+Version: 0.4.7
 Authors@R: 
     person(given = "Christian",
            family = "Hohenfeld",
diff --git a/R/compare_measure_group.R b/R/compare_measure_group.R
index 2a23b3b..9dd6192 100644
--- a/R/compare_measure_group.R
+++ b/R/compare_measure_group.R
@@ -46,8 +46,11 @@ compare_measure_group <- function(rawlist, dv, ..., add_name = FALSE,
     }
 
     bayes <- rstanarm::stan_glm(frml, data = grplist, iter = 2000, refresh = 0)
+    # explicitly use 0.1 * SD
+    abs_bound <- 0.1 * stats::sd(grplist[[dv]])
+    use_rope_range <- c(-abs_bound, abs_bound)
     bayes_tbl <- parameters::model_parameters(
-        bayes, test = c("pd", "rope", "bf"))
+        bayes, test = c("pd", "rope", "bf"), rope_range = use_rope_range)
 
     list(lm = mod, lm_tbl = modtbl,
          anova = av, anova_tbl = tbl,
-- 
GitLab