Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
strengejacke committed Sep 5, 2024
1 parent b8c317c commit e81ac49
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
6 changes: 5 additions & 1 deletion R/p_direction.R
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,11 @@ p_direction.lm <- function(x,
null = 0,
...) {
# generate normal distribution based on CI range
out <- .posterior_ci(x, ci, ...)
result <- .posterior_ci(x, ci, ...)

# copy
out <- result$out
posterior <- result$posterior

# add pd
out$pd <- as.numeric(bayestestR::p_direction(
Expand Down
8 changes: 6 additions & 2 deletions R/p_significance.R
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,11 @@ bayestestR::p_significance
#' @export
p_significance.lm <- function(x, threshold = "default", ci = 0.95, verbose = TRUE, ...) {
# generate normal distribution based on CI range
out <- .posterior_ci(x, ci, ...)
result <- .posterior_ci(x, ci, ...)

# copy
out <- result$out
posterior <- result$posterior

# calculate the ROPE range
if (all(threshold == "default")) {
Expand Down Expand Up @@ -198,7 +202,7 @@ p_significance.lm <- function(x, threshold = "default", ci = 0.95, verbose = TRU
colnames(posterior) <- paste0(out$Parameter, "_", comps)
out$Parameter <- paste0(out$Parameter, "_", comps)
}
out
list(out = out, posterior = posterior)
}


Expand Down

0 comments on commit e81ac49

Please sign in to comment.