Random number generation under the Gamma-extended Binomial distribution.
rGammaBinom(n, size, prob, precision = 1e-04)
Number of observations.
Number of "trials" (zero or more). Need not be integer.
Probability of "success" on each "trial". Need not be integer.
The precision with which the quantile is to be calculated. Default is 1e-4 (i.e., search terminates when there is no registered change in estimate at the fourth decimal). Tuning this value will impact the time it takes for the search algorithm to arrive at an estimate.
# Assume some variable follows a Gamma-Binomial distribution with
# "number of trials" = 10.5 and probability of "success" for each "trial"
# = 0.75 To draw a random value from this distribution:
rGammaBinom(n = 1, size = 10, prob = 0.75)
Run the code above in your browser using DataLab