R/later_mbeta.R

Defines functions mbeta

#' Multivariate Beta
#' 
#' 
#' @keywords internal
#' @noRd
mbeta <- function(m, a, b, log=FALSE){
  m      = round(m)
  logval = mgamma(m,a,log=TRUE) + mgamma(m,b,log=TRUE) - mgamma(m,(a+b),log=TRUE)
  if (log){
    return(logval)
  } else {
    return(base::exp(logval))
  }
}

Try the maotai package in your browser

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

maotai documentation built on Oct. 25, 2021, 9:06 a.m.