Free Access Week - Data Engineering + BI
Data Engineering and BI courses are free this week!
Free Access Week - Jun 2-8

betafunctions (version 1.9.0)

rGammaBinom: Random number generation under the Gamma-extended Binomial distribution.

Description

Random number generation under the Gamma-extended Binomial distribution.

Usage

rGammaBinom(n, size, prob, precision = 1e-04)

Arguments

n

Number of observations.

size

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

prob

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

precision

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.

Examples

Run this code
# 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