diff --git a/R/map_estimate.R b/R/map_estimate.R index b0e4ebd8c..f06628403 100644 --- a/R/map_estimate.R +++ b/R/map_estimate.R @@ -26,7 +26,7 @@ #' map_estimate(posterior) #' #' plot(density(posterior)) -#' abline(v = map_estimate(posterior), col = "red") +#' abline(v = as.numeric(map_estimate(posterior)), col = "red") #' #' model <- rstanarm::stan_glm(mpg ~ wt + cyl, data = mtcars) #' map_estimate(model) diff --git a/R/p_significance.R b/R/p_significance.R index 0ff802a54..15d54b682 100644 --- a/R/p_significance.R +++ b/R/p_significance.R @@ -2,8 +2,9 @@ #' #' Compute the probability of **Practical Significance** (***ps***), which can be conceptualized as a unidirectional equivalence test. It returns the probability that effect is above a given threshold corresponding to a negligible effect in the median's direction. Mathematically, it is defined as the proportion of the posterior distribution of the median sign above the threshold. #' -#' @inheritParams rope #' @param threshold The threshold value that separates significant from negligible effect. If `"default"`, the range is set to `0.1` if input is a vector, and based on [`rope_range()`][rope_range] if a Bayesian model is provided. +#' @inheritParams rope +#' @inheritParams hdi #' #' @return Values between 0 and 1 corresponding to the probability of practical significance (ps). #' diff --git a/R/si.R b/R/si.R index 6e8fb7c32..fd353c52f 100644 --- a/R/si.R +++ b/R/si.R @@ -84,7 +84,7 @@ #' The Support Interval. \doi{10.31234/osf.io/zwnxb} #' #' @export -si <- function(posterior, prior = NULL, BF = 1, verbose = TRUE, ...) { +si <- function(posterior, ...) { UseMethod("si") } diff --git a/man/map_estimate.Rd b/man/map_estimate.Rd index 79eb95dab..41b8f6ba5 100644 --- a/man/map_estimate.Rd +++ b/man/map_estimate.Rd @@ -106,7 +106,7 @@ posterior <- rnorm(10000) map_estimate(posterior) plot(density(posterior)) -abline(v = map_estimate(posterior), col = "red") +abline(v = as.numeric(map_estimate(posterior)), col = "red") model <- rstanarm::stan_glm(mpg ~ wt + cyl, data = mtcars) map_estimate(model) diff --git a/man/p_significance.Rd b/man/p_significance.Rd index bd53edd5e..f275550ae 100644 --- a/man/p_significance.Rd +++ b/man/p_significance.Rd @@ -49,6 +49,11 @@ p_significance(x, ...) \item{threshold}{The threshold value that separates significant from negligible effect. If \code{"default"}, the range is set to \code{0.1} if input is a vector, and based on \code{\link[=rope_range]{rope_range()}} if a Bayesian model is provided.} +\item{use_iterations}{Logical, if \code{TRUE} and \code{x} is a \code{get_predicted} object, +(returned by \code{\link[insight:get_predicted]{insight::get_predicted()}}), the function is applied to the +iterations instead of the predictions. This only applies to models that return +iterations for predicted values (e.g., \code{brmsfit} models).} + \item{verbose}{Toggle off warnings.} \item{effects}{Should results for fixed effects, random effects or both be diff --git a/man/si.Rd b/man/si.Rd index 2d132000d..5fea658df 100644 --- a/man/si.Rd +++ b/man/si.Rd @@ -11,7 +11,7 @@ \alias{si.data.frame} \title{Compute Support Intervals} \usage{ -si(posterior, prior = NULL, BF = 1, verbose = TRUE, ...) +si(posterior, ...) \method{si}{numeric}(posterior, prior = NULL, BF = 1, verbose = TRUE, ...) @@ -69,15 +69,15 @@ si(posterior, prior = NULL, BF = 1, verbose = TRUE, ...) \code{emmGrid} or a data frame - representing a posterior distribution(s) from (see 'Details').} +\item{...}{Arguments passed to and from other methods. (Can be used to pass +arguments to internal \code{\link[logspline:logspline]{logspline::logspline()}}.)} + \item{prior}{An object representing a prior distribution (see 'Details').} \item{BF}{The amount of support required to be included in the support interval.} \item{verbose}{Toggle off warnings.} -\item{...}{Arguments passed to and from other methods. (Can be used to pass -arguments to internal \code{\link[logspline:logspline]{logspline::logspline()}}.)} - \item{effects}{Should results for fixed effects, random effects or both be returned? Only applies to mixed models. May be abbreviated.}