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

◆ neg_binomial_2_log_lpmf() [1/3]

template<bool propto, typename T_n_cl , typename T_log_location_cl , typename T_precision_cl , require_all_prim_or_rev_kernel_expression_t< T_n_cl, T_log_location_cl, T_precision_cl > * = nullptr, require_any_not_stan_scalar_t< T_n_cl, T_log_location_cl, T_precision_cl > * = nullptr>
return_type_t< T_n_cl, T_log_location_cl, T_precision_cl > stan::math::neg_binomial_2_log_lpmf ( const T_n_cl &  n,
const T_log_location_cl &  eta,
const T_precision_cl &  phi 
)
inline

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

n, eta, or phi 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_log_location_cltype of location parameter
T_precision_cltype of precision parameter
Parameters
n(Sequence of) scalar(s).
eta(Sequence of) location parameter(s)
phi(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 43 of file neg_binomial_2_log_lpmf.hpp.