swh:1:snp:2c68a6c5a8af2f06ac2c0225927f25b54fd1f9d0
Raw File
Tip revision: 6acd4f1707b182a2cbe2f4a4c2d4196571d36eb3 authored by Dominique Makowski on 05 December 2020, 08:30:02 UTC
version 0.8.0
Tip revision: 6acd4f1
print.bayesfactor_restricted.R
#' @export
print.bayesfactor_restricted <- function(x, digits = 3, log = FALSE, ...) {
  BFE <- x

  if (log) {
    BFE$BF <- log(BFE$BF)
  }

  BFE$BF <- insight::format_value(BFE$BF, digits = digits, missing = "NA")

  colnames(BFE) <- c("Hypothesis", "P(Prior)", "P(Posterior)", "BF")

  insight::print_color("# Bayes Factor (Order-Restriction)\n\n", "blue")

  print.data.frame(BFE, digits = digits, row.names = FALSE)

  cat("\n* Bayes factors for the restricted model vs. the un-restricted model.\n")

  if (log) insight::print_color("\nBayes Factors are on the log-scale.\n", "red")
  invisible(x)
}
back to top