1#ifndef STAN_MATH_MIX_PROB_LAPLACE_LATENT_BERNOULLI_LOGIT_RNG_HPP
2#define STAN_MATH_MIX_PROB_LAPLACE_LATENT_BERNOULLI_LOGIT_RNG_HPP
33template <
typename ThetaVec,
typename Mean,
typename CovarFun,
34 typename CovarArgs,
typename RNG,
35 require_eigen_vector_t<ThetaVec>* =
nullptr>
37 const std::vector<int>& y,
const std::vector<int>& n_samples, Mean&&
mean,
38 CovarFun&& covariance_function, CovarArgs&& covar_args, ThetaVec&& theta_0,
39 const double tolerance,
const int max_num_steps,
40 const int hessian_block_size,
const int solver,
41 const int max_steps_line_search, RNG& rng, std::ostream* msgs) {
43 max_steps_line_search, tolerance,
47 std::forward_as_tuple(
to_vector(y), n_samples, std::forward<Mean>(
mean)),
48 std::forward<CovarFun>(covariance_function),
49 std::forward<CovarArgs>(covar_args), ops, rng, msgs);
71template <
typename Mean,
typename CovarFun,
typename CovarArgs,
typename RNG>
73 const std::vector<int>& y,
const std::vector<int>& n_samples, Mean&&
mean,
74 CovarFun&& covariance_function, CovarArgs&& covar_args, RNG& rng,
78 std::forward_as_tuple(
to_vector(y), n_samples, std::forward<Mean>(
mean)),
79 std::forward<CovarFun>(covariance_function),
auto to_vector(T_x &&x)
Returns input matrix reshaped into a vector.
scalar_type_t< T > mean(const T &m)
Returns the sample mean (i.e., average) of the coefficients in the specified std vector,...
Eigen::VectorXd laplace_base_rng(LLFunc &&ll_fun, LLArgs &&ll_args, CovarFun &&covariance_function, CovarArgs &&covar_args, const laplace_options< InitTheta > &options, RNG &rng, std::ostream *msgs)
In a latent gaussian model,.
T value_of(const fvar< T > &v)
Return the value of the specified variable.
Eigen::VectorXd laplace_latent_tol_bernoulli_logit_rng(const std::vector< int > &y, const std::vector< int > &n_samples, Mean &&mean, CovarFun &&covariance_function, CovarArgs &&covar_args, ThetaVec &&theta_0, const double tolerance, const int max_num_steps, const int hessian_block_size, const int solver, const int max_steps_line_search, RNG &rng, std::ostream *msgs)
In a latent gaussian model,.
Eigen::VectorXd laplace_latent_bernoulli_logit_rng(const std::vector< int > &y, const std::vector< int > &n_samples, Mean &&mean, CovarFun &&covariance_function, CovarArgs &&covar_args, RNG &rng, std::ostream *msgs)
In a latent gaussian model,.
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...