R/support.R

Defines functions support.mvnormMix support.normMix support.gammaMix support.betaMix support.default support

Documented in support

#' Support of Distributions
#'
#' Returns the support of a distribution.
#'
#' @param mix Mixture distribution.
#'
#' @keywords internal
support <- function(mix) UseMethod("support")
#' @export
support.default <- function(mix) stop("Unknown mixture")
#' @export
support.betaMix <- function(mix) mixlink(mix, c(0,1))
#' @export
support.gammaMix <- function(mix) mixlink(mix, c(0,Inf))
#' @export
support.normMix <- function(mix) mixlink(mix, c(-Inf,Inf))
#' @export
support.mvnormMix <- function(mix) matrix(c(-Inf, Inf), nrow=mvnormdim(mix[-1,1]), ncol=2)

Try the RBesT package in your browser

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

RBesT documentation built on Aug. 22, 2023, 1:08 a.m.