R/80_methods.R

Defines functions plot.bm summary.bm print.bm

#' @export
print.bm <- function(x, ...) {
  cat("\nCall:\n", paste(deparse(x$call), sep = "\n", collapse = "\n"), "\n\n", sep = "")
  cat("Draws (total): ", NROW(x$draw), " (", x$model$get_meta, ")\n", sep = "")
  coefs <- colMeans(x$draw)
  cat("Coefficients (mean):\n")
  print.default(format(coefs, digits = 3L), print.gap = 2L, quote = FALSE)
  cat("\n")
  # invisible(x)
}


#' @export
summary.bm <- function(object, ...) {
  summary(object$draws)
}


#' @export
#' @importFrom stats plot.ts
plot.bm <- function(x, ...) {
  plot.ts(x$draws)
}

Try the bsreg package in your browser

Any scripts or data that you put into this service are public.

bsreg documentation built on March 18, 2022, 5:36 p.m.