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

◆ laplace_marginal_neg_binomial_2_log_summary_lpmf()

template<bool propto = false, typename Eta , typename Mean , typename CovarFun , typename CovarArgs >
auto stan::math::laplace_marginal_neg_binomial_2_log_summary_lpmf ( const std::vector< int > &  y,
const std::vector< int > &  n_per_group,
const std::vector< int > &  counts_per_group,
const Eta &  eta,
Mean &&  mean,
CovarFun &&  covariance_function,
CovarArgs &&  covar_args,
std::ostream *  msgs 
)
inline

Wrapper function around the laplace_marginal function for a negative binomial likelihood.

Uses the 2nd parameterization. Returns the marginal density p(y|phi) by marginalizing out the latent gaussian variable, with a Laplace approximation. See the laplace_marginal function for more details.

Template Parameters
EtaThe type of parameter arguments for the likelihood function.
Meantype of the mean of the latent normal distribution
CovarFunA functor with an operator()(CovarArgsElements..., {TrainTupleElements...| PredTupleElements...}) method. The operator() method should accept as arguments the inner elements of CovarArgs. The return type of the operator() method should be a type inheriting from Eigen::EigenBase with dynamic sized rows and columns.
CovarArgsA tuple of types to passed as the first arguments of CovarFun::operator()
Parameters
[in]yobservations.
[in]n_per_groupnumber of samples per group
[in]counts_per_grouptotal counts per group
[in]etanon-marginalized model parameters for the likelihood.
[in]meanthe mean of the latent normal variable
[in]covariance_functiona function which returns the prior covariance.
[in]covar_argsarguments for the covariance function.
[in,out]msgsstream for messages from likelihood and covariance

Definition at line 212 of file laplace_marginal_neg_binomial_2_log_lpmf.hpp.