R/rvnbeta.R

#' @noRd
#' @export
rvnbeta <- function (n=1, shape1, shape2) {
  if (any(shape1<0, na.rm=TRUE) || any(shape2<0, na.rm=TRUE)) {
    stop("Neutral Beta distribution requires positive parameters")
  }
  shape1 <- (shape1 + 1/3)
  shape2 <- (shape2 + 1/3)
  rvvapply(rbeta, n.=n, shape1=shape1, shape2=shape2)
}

Try the rv package in your browser

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

rv documentation built on March 18, 2022, 5:55 p.m.