Skip to content

Commit

Permalink
generic only has one argument, #525
Browse files Browse the repository at this point in the history
  • Loading branch information
strengejacke committed Oct 2, 2023
1 parent 6fd95a9 commit 399a257
Show file tree
Hide file tree
Showing 10 changed files with 98 additions and 90 deletions.
136 changes: 68 additions & 68 deletions R/describe_posterior.R

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion R/diagnostic_posterior.R
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,12 @@
#' \item Kruschke, J. (2014). Doing Bayesian data analysis: A tutorial with R, JAGS, and Stan. Academic Press.
#' }
#' @export
diagnostic_posterior <- function(posteriors, diagnostic = c("ESS", "Rhat"), ...) {
diagnostic_posterior <- function(posteriors, ...) {
UseMethod("diagnostic_posterior")
}


#' @rdname diagnostic_posterior
#' @export
diagnostic_posterior.default <- function(posteriors, diagnostic = c("ESS", "Rhat"), ...) {
insight::format_error("'diagnostic_posterior()' only works with rstanarm, brms or blavaan models.")
Expand Down
2 changes: 1 addition & 1 deletion R/map_estimate.R
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
#' }
#'
#' @export
map_estimate <- function(x, precision = 2^10, method = "kernel", ...) {
map_estimate <- function(x, ...) {
UseMethod("map_estimate")
}

Expand Down
3 changes: 2 additions & 1 deletion R/p_map.R
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
#' - Mills, J. A. (2018). Objective Bayesian Precise Hypothesis Testing. University of Cincinnati.
#'
#' @export
p_map <- function(x, null = 0, precision = 2^10, method = "kernel", ...) {
p_map <- function(x, ...) {
UseMethod("p_map")
}

Expand All @@ -80,6 +80,7 @@ p_pointnull <- p_map



#' @rdname p_map
#' @export
p_map.numeric <- function(x, null = 0, precision = 2^10, method = "kernel", ...) {
p_map(data.frame(Posterior = x), null = null, precision = precision, method = method, ...)
Expand Down
2 changes: 1 addition & 1 deletion R/p_to_bf.R
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
#' @seealso [bic_to_bf()] for more accurate approximate Bayes factors.
#'
#' @export
p_to_bf <- function(x, log = FALSE, ...) {
p_to_bf <- function(x, ...) {
UseMethod("p_to_bf")
}

Expand Down
10 changes: 5 additions & 5 deletions man/describe_posterior.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 6 additions & 3 deletions man/diagnostic_posterior.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions man/map_estimate.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 7 additions & 4 deletions man/p_map.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions man/p_to_bf.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 399a257

Please sign in to comment.