View source: R/betafunctions.R
rBetaBinom | R Documentation |
Random Number Generation under the Beta-Binomial Probability Mass Distribution.
rBetaBinom(n, N, l, u, alpha, beta)
n |
Number of draws. |
N |
Number of trials. |
l |
The first (lower) location parameter. |
u |
The second (upper) location parameter. |
alpha |
The alpha (first) shape parameter. |
beta |
The beta (second) shape parameter. |
A vector with length n
of random values drawn from the Beta-Binomial Distribution.
# To draw a sample of 50 values from a Beta-Binomial distribution with
# number of trials = 100, and with success-probabilities drawn from a
# Four-Parameter Beta distribution with location parameters l = 0.25 and
# u = 0.95, and shape-parameters alpha = 5 and beta = 3:
rBetaBinom(n = 50, N = 100, l = 0.25, u = 0.95, alpha = 5, beta = 3)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.