1 #ifndef STAN_MATH_PRIM_SCAL_PROB_BETA_BINOMIAL_RNG_HPP
2 #define STAN_MATH_PRIM_SCAL_PROB_BETA_BINOMIAL_RNG_HPP
28 static const char*
function(
"beta_binomial_rng");
32 "First prior sample size parameter", alpha);
34 "Second prior sample size parameter", beta);
36 double a =
beta_rng(alpha, beta, rng);
37 while (a > 1 || a < 0)
double beta_rng(const double alpha, const double beta, RNG &rng)
int beta_binomial_rng(const int N, const double alpha, const double beta, RNG &rng)
bool check_nonnegative(const char *function, const char *name, const T_y &y)
Return true if y is non-negative.
int binomial_rng(const int N, const double theta, RNG &rng)
bool check_positive_finite(const char *function, const char *name, const T_y &y)
Return true if y is positive and finite.