Nothing
#' Lower Credible Limit
#'
#' Calculates the quantile-based lower credible limit.
#'
#' By default it returns the 95% credible limit which
#' corresponds to the 2.5% quantile.
#'
#' @inheritParams params
#' @param x A numeric vector of MCMC values.
#' @return A number.
#' @family summary
#' @export
#' @examples
#' lower(as.numeric(0:100))
lower <- function(x, conf_level = 0.95, na_rm = FALSE) {
chk_numeric(x)
chk_number(conf_level)
chk_range(conf_level)
if (anyNA(x)) {
if (vld_false(na_rm)) {
return(NA_real_)
}
x <- as.vector(x)
x <- x[!is.na(x)]
}
if (!length(x)) {
return(NA_real_)
}
lower <- (1 - conf_level) / 2
x <- stats::quantile(x, lower)
x <- unname(x)
x
}
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.