dGammaBinom: Probability density function under the Gamma-extended...

View source: R/betafunctions.R

dGammaBinomR Documentation

Probability density function under the Gamma-extended Binomial distribution.

Description

Probability density function under the Gamma-extended Binomial distribution.

Usage

dGammaBinom(x, size, prob, nc = FALSE)

Arguments

x

Vector of quantiles.

size

Number of "trials" (zero or more). Need not be integer.

prob

Probability of "success" on each "trial". Need not be integer.

nc

Whether to include a normalizing constant making sure that the sum of the distribution's density is 1.

References

Loeb, D. E. (1992). A generalization of the binomial coefficients. Discrete Mathematics, 105(1-3).

Examples

#' # Assume some variable follows a Gamma-Binomial distribution with
# "number of trials" = 10.5 and probability of "success" for each "trial"
# = 0.75, to compute the probability density to attain a "number of success"
# at a specific point (e.g., 7.5 "successes"):
dGammaBinom(x = 7.5, size = 10.5, prob = 0.75)

# Including a normalizing constant (then diverges from binomial dist.):
dGammaBinom(x = 7.5, size = 10.5, prob = 0.75, nc = TRUE)
dGammaBinom(x = 7, size = 10, prob = 0.75) == dbinom(7, 10, 0.75)
dGammaBinom(x = 7, size = 10, prob = 0.75, nc = TRUE) == dbinom(7, 10, 0.75)

betafunctions documentation built on May 29, 2024, 1:13 a.m.