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

◆ laplace_latent_bernoulli_logit_rng()

template<typename Mean , typename CovarFun , typename CovarArgs , typename RNG >
Eigen::VectorXd stan::math::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 
)
inline

In a latent gaussian model,.

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

return a multivariate normal random variate sampled from the gaussian approximation of p(theta | y, phi), where the likelihood is a Bernoulli with logit link.

Template Parameters
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()
RNGA valid boost rng type
Parameters
[in]yVector Vector of total number of trials with a positive outcome.
[in]n_samplesVector of number of trials.
[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]rngRandom number generator
[in,out]msgsstream for messages from likelihood and covariance

Definition at line 72 of file laplace_latent_bernoulli_logit_rng.hpp.