R/negBinom.R

#' @title Negative Binomial
#'
#' @param y
#' @param r
#' @param p
#'
#' @return Calculated negative binomial with given values
#' @export
#'
#' @examples negBinom(10, 3, 0.4)
#'
negBinom = function (y, r, p){

  choose(y-1,r-1)*p^r*(1-p)^(y-r)
}
Xanaste/MATH4753KELLER documentation built on Feb. 26, 2021, 12:24 a.m.