1 #ifndef STAN_MATH_PRIM_SCAL_PROB_NEG_BINOMIAL_2_CCDF_LOG_HPP
2 #define STAN_MATH_PRIM_SCAL_PROB_NEG_BINOMIAL_2_CCDF_LOG_HPP
16 template <
typename T_n,
typename T_location,
typename T_precision>
17 typename return_type<T_location, T_precision>::type
20 const T_precision& phi) {
26 static const char*
function(
"neg_binomial_2_cdf");
32 "Location parameter", mu,
33 "Precision Parameter", phi);
38 size_t size_beta =
max_size(mu, phi);
41 T_location, T_precision> beta_vec(size_beta);
42 for (
size_t i = 0; i < size_beta; ++i)
43 beta_vec[i] = phi_vec[i] / mu_vec[i];
bool check_not_nan(const char *function, const char *name, const T_y &y)
Return true if y is not NaN.
return_type< T_location, T_precision >::type neg_binomial_2_ccdf_log(const T_n &n, const T_location &mu, const T_precision &phi)
size_t length(const std::vector< T > &x)
return_type< T_shape, T_inv_scale >::type neg_binomial_ccdf_log(const T_n &n, const T_shape &alpha, const T_inv_scale &beta)
size_t max_size(const T1 &x1, const T2 &x2)
VectorBuilder allocates type T1 values to be used as intermediate values.
bool check_consistent_sizes(const char *function, const char *name1, const T1 &x1, const char *name2, const T2 &x2)
Return true if the dimension of x1 is consistent with x2.
VectorBuilderHelper< T1, used, contains_vector< T2, T3, T4, T5, T6, T7 >::value >::type data()
VectorView is a template expression that is constructed with a container or scalar, which it then allows to be used as an array using operator[].
bool check_positive_finite(const char *function, const char *name, const T_y &y)
Return true if y is positive and finite.