[Questioning] Allows an inverse gamma distribution to be. tuned so that less than 0.01 of its probability mass function falls outside of the specified bounds. This is required when using an inverse gamma prior, for example for a Gaussian process. As no inverse gamma priors are currently in use and this function has some stability issues it may be deprecated at a later date.

tune_inv_gamma(lower = 2, upper = 21, model = NULL)

Arguments

lower

Numeric, defaults to 2. Lower truncation bound.

upper

Numeric, defaults to 21. Upper truncation bound.

Value

A list of alpha and beta values that describe a inverse gamma distribution that achieves the target truncation.

Examples


tune_inv_gamma(lower = 2, upper = 21)
#> Error in (function (classes, fdef, mtable) {    methods <- .findInheritedMethods(classes, fdef, mtable)    if (length(methods) == 1L)         return(methods[[1L]])    else if (length(methods) == 0L) {        cnames <- paste0("\"", vapply(classes, as.character,             ""), "\"", collapse = ", ")        stop(gettextf("unable to find an inherited method for function %s for signature %s",             sQuote(fdef@generic), sQuote(cnames)), domain = NA)    }    else stop("Internal error in finding inherited methods; didn't return a unique method",         domain = NA)})(list("NULL"), new("nonstandardGenericFunction", .Data = function (object,     ...) {    standardGeneric("sampling")}, generic = structure("sampling", package = "rstan"), package = "rstan",     group = list(), valueClass = character(0), signature = "object",     default = NULL, skeleton = (function (object, ...)     stop(gettextf("invalid call in method dispatch to '%s' (no default method)",         "sampling"), domain = NA))(object, ...)), <environment>): unable to find an inherited method for function ‘sampling’ for signature ‘"NULL"’