Automatic Differentiation
 
Loading...
Searching...
No Matches

◆ beta_binomial_rng()

template<typename T_N , typename T_shape1 , typename T_shape2 , class RNG >
VectorBuilder< true, int, T_N, T_shape1, T_shape2 >::type stan::math::beta_binomial_rng ( const T_N &  N,
const T_shape1 &  alpha,
const T_shape2 &  beta,
RNG &  rng 
)
inline

Return a beta-binomial random variate with the specified population size, success, and failure parameters using the given random number generator.

N, alpha, and beta can each be a scalar or a one-dimensional container. Any non-scalar inputs must be the same size.

Template Parameters
T_NType of population size parameter
T_shape1Type of success parameter
T_shape2Type of failure parameter
RNGtype of random number generator
Parameters
N(Sequence of) population size parameter(s)
alpha(Sequence of) positive success parameter(s)
beta(Sequence of) positive failure parameter(s)
rngrandom number generator
Returns
(Sequence of) beta-binomial random variate(s)
Exceptions
std::domain_errorif N is negative, or alpha or beta are nonpositive
std::invalid_argumentif non-scalar arguments are of different sizes

Definition at line 33 of file beta_binomial_rng.hpp.