1#ifndef STAN_MATH_MIX_PROB_LAPLACE_MARGINAL_HPP
2#define STAN_MATH_MIX_PROB_LAPLACE_MARGINAL_HPP
28template <
bool propto =
false,
typename LFun,
typename LArgs,
typename CovarFun,
29 typename CovarArgs,
typename OpsTuple>
31 CovarFun&& covariance_function,
32 CovarArgs&& covar_args, OpsTuple&& ops,
35 std::forward<LFun>(L_f), std::forward<LArgs>(l_args),
36 std::forward<CovarFun>(covariance_function),
37 std::forward<CovarArgs>(covar_args),
58template <
bool propto =
false,
typename LFun,
typename LArgs,
typename CovarFun,
61 CovarFun&& covariance_function,
62 CovarArgs&& covar_args, std::ostream* msgs) {
64 std::forward<LFun>(L_f), std::forward<LArgs>(l_args),
65 std::forward<CovarFun>(covariance_function),
Reference for calculations of marginal and its gradients: Margossian et al (2020),...
constexpr auto tuple_to_laplace_options(Options &&ops)
auto laplace_marginal_tol(LFun &&L_f, LArgs &&l_args, CovarFun &&covariance_function, CovarArgs &&covar_args, OpsTuple &&ops, std::ostream *msgs)
Wrapper function around the laplace_marginal_density function.
auto laplace_marginal_density(LLFun &&ll_fun, LLTupleArgs &&ll_args, CovarFun &&covariance_function, CovarArgs &&covar_args, const laplace_options< InitTheta > &options, std::ostream *msgs)
For a latent Gaussian model with global parameters phi, latent variables theta, and observations y,...
auto laplace_marginal(LFun &&L_f, LArgs &&l_args, CovarFun &&covariance_function, CovarArgs &&covar_args, std::ostream *msgs)
Wrapper function around the laplace_marginal function.
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...