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

◆ beta_binomial_lpmf() [1/3]

template<bool propto, typename T_n_cl , typename T_N_cl , typename T_size1_cl , typename T_size2_cl , require_all_prim_or_rev_kernel_expression_t< T_n_cl, T_size1_cl, T_size2_cl > * = nullptr, require_any_not_stan_scalar_t< T_n_cl, T_size1_cl, T_size2_cl > * = nullptr>
return_type_t< T_n_cl, T_size1_cl, T_size2_cl > stan::math::beta_binomial_lpmf ( const T_n_cl &  n,
const T_N_cl  N,
const T_size1_cl &  alpha,
const T_size2_cl &  beta 
)

Returns the log PMF of the Beta-Binomial distribution with given population size, prior success, and prior failure parameters.

Given containers of matching sizes, returns the log sum of probabilities.

Template Parameters
T_ntype of success parameter
T_Ntype of population size parameter
T_size1type of prior success parameter
T_size2type of prior failure parameter
Parameters
nsuccess parameter
Npopulation size parameter
alphaprior success parameter
betaprior failure parameter
Returns
log probability or log sum of probabilities
Exceptions
std::domain_errorif N, alpha, or beta fails to be positive
std::invalid_argumentif container sizes mismatch

Definition at line 43 of file beta_binomial_lpmf.hpp.