diff --git a/R/p_significance.R b/R/p_significance.R index 7c1e01898..e9027d420 100644 --- a/R/p_significance.R +++ b/R/p_significance.R @@ -15,7 +15,8 @@ #' (i.e. the threshold range is set to -0.1 and 0.1, i.e. reflects a symmetric #' interval) #' - a numeric vector of length two (e.g., `c(-0.2, 0.1)`), useful for -#' asymmetric intervals. +#' asymmetric intervals +#' - a list of numeric vectors, where each vector corresponds to a parameter. #' @inheritParams rope #' @inheritParams hdi #' @@ -53,6 +54,8 @@ #' chains = 2, refresh = 0 #' ) #' p_significance(model) +#' # multiple thresholds +#' p_significance(model, threshold = list(c(-10, 5), c(-0.2, 0.2), "default")) #' } #' @export p_significance <- function(x, ...) { diff --git a/man/p_significance.Rd b/man/p_significance.Rd index 30b2170e5..1e4ad290c 100644 --- a/man/p_significance.Rd +++ b/man/p_significance.Rd @@ -59,7 +59,8 @@ and based on \code{\link[=rope_range]{rope_range()}} if a (Bayesian) model is pr (i.e. the threshold range is set to -0.1 and 0.1, i.e. reflects a symmetric interval) \item a numeric vector of length two (e.g., \code{c(-0.2, 0.1)}), useful for -asymmetric intervals. +asymmetric intervals +\item a list of numeric vectors, where each vector corresponds to a parameter. }} \item{use_iterations}{Logical, if \code{TRUE} and \code{x} is a \code{get_predicted} object, @@ -131,6 +132,8 @@ model <- rstanarm::stan_glm(mpg ~ wt + cyl, chains = 2, refresh = 0 ) p_significance(model) +# multiple thresholds +p_significance(model, threshold = list(c(-10, 5), c(-0.2, 0.2), "default")) } \dontshow{\}) # examplesIf} }