easystats / bayestestR

:ghost: Utilities for analyzing Bayesian models and posterior distributions
https://easystats.github.io/bayestestR/
GNU General Public License v3.0
563 stars 55 forks source link

Allow `p_significance()` to accept non symetric `threshold` range #663

Closed mattansb closed 4 weeks ago

mattansb commented 1 month ago

Current behavior:

x <- rnorm(4000, 1)
bayestestR::p_significance(x, threshold = c(-0.1, 0.2))
#> Error: `threshold` should be 'default' or a numeric value (e.g., 0.1).

Why this should be allowed:

  1. For ratios, the symmetric would be around 1 (e.g., [0.8,1.25] is a symmetric ratio range around 1).
  2. Tails might not be equal - a large positive difference and small negative difference might be equally "significant".