rBetaBinom {betafunctions}R Documentation

Random Number Generation under the Beta-Binomial Probability Mass Distribution.

Description

Random Number Generation under the Beta-Binomial Probability Mass Distribution.

Usage

rBetaBinom(n, N, l, u, alpha, beta)

Arguments

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.

Value

A vector with length n of random values drawn from the Beta-Binomial Distribution.

Examples

# 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)

[Package betafunctions version 1.9.0 Index]