R/rdir_exmcmcPack.R

#' #' @keywords internal
#' .mcmc_pack_rdirichlet <- function (n, alpha)
#' {
#'   l <- length(alpha)
#'   x <- matrix(stats::rgamma(l * n, alpha), ncol = l, byrow = TRUE)
#'   sm <- x %*% rep(1, l)
#'   return(x/as.vector(sm))
#' }

Try the intRinsic package in your browser

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

intRinsic documentation built on Sept. 13, 2024, 1:07 a.m.