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

◆ laplace_latent_rng()

template<typename LLFunc , typename LLArgs , typename CovarFun , typename CovarArgs , typename RNG >
auto stan::math::laplace_latent_rng ( LLFunc &&  L_f,
LLArgs &&  ll_args,
CovarFun &&  covariance_function,
CovarArgs &&  covar_args,
RNG &  rng,
std::ostream *  msgs 
)
inline

In a latent gaussian model,.

theta ~ Normal(0, Sigma(phi)) y ~ p(y|theta,phi)

return a sample from the Laplace approximation to p(theta|y,phi), where the log likelihood is given by L_f.

Template Parameters
LLFuncType of likelihood function.
LLArgsType of arguments of likelihood function.
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()
RNGA valid boost rng type
Parameters
[in]L_fFunction that returns log likelihood.
[in]ll_argsArguments for likelihood function.
[in]covariance_functiona function which returns the prior covariance.
[in]covar_argsarguments for the covariance function.
[in,out]rngRandom number generator
[in,out]msgsstream for messages from likelihood and covariance

Definition at line 68 of file laplace_latent_rng.hpp.