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

◆ neg_binomial_lpmf() [1/3]

template<bool propto, typename T_n_cl , typename T_shape_cl , typename T_inv_scale_cl , require_all_prim_or_rev_kernel_expression_t< T_n_cl, T_shape_cl, T_inv_scale_cl > * = nullptr, require_any_not_stan_scalar_t< T_n_cl, T_shape_cl, T_inv_scale_cl > * = nullptr>
return_type_t< T_n_cl, T_shape_cl, T_inv_scale_cl > stan::math::neg_binomial_lpmf ( const T_n_cl &  n,
const T_shape_cl &  alpha,
const T_inv_scale_cl &  beta 
)
inline

The log of the negative binomial density for the specified scalars given the specified mean(s) and deviation(s).

n, alpha, or beta can each be either a scalar or a vector matrix_cl. Any vector inputs must be the same length.

The result log probability is defined to be the sum of the log probabilities for each observation/mean/deviation triple.

Template Parameters
T_n_cltype of scalar
T_shape_cltype of location parameter
T_inv_scale_cltype of precision parameter
Parameters
n(Sequence of) scalar(s).
alpha(Sequence of) location parameter(s)
beta(Sequence of) precision parameters
Returns
The log of the product of the densities.
Exceptions
std::domain_errorif the scale is not positive.

Definition at line 40 of file neg_binomial_lpmf.hpp.