![]() |
Stan Math Library
5.1.0
Automatic Differentiation
|
|
inline |
Wrapper function around the laplace_marginal function for a logistic Bernoulli likelihood.
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.
| propto | boolean ignored |
| ThetaVec | A type inheriting from Eigen::EigenBase with dynamic sized rows and 1 column. |
| Mean | type of the mean of the latent normal distribution |
| CovarFun | A 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. |
| CovarArgs | A tuple of types to passed as the first arguments of CovarFun::operator() |
| [in] | y | total counts per group. Second sufficient statistics. |
| [in] | n_samples | number of samples per group. First sufficient statistics. |
| [in] | mean | the mean of the latent normal variable. |
| [in] | covariance_function | a function which returns the prior covariance. |
| [in] | covar_args | arguments for the covariance function. |
| [in] | theta_0 | the initial guess for the Laplace approximation. |
| [in] | tolerance | controls the convergence criterion when finding the mode in the Laplace approximation. |
| [in] | max_num_steps | maximum number of steps before the Newton solver breaks and returns an error. |
| [in] | hessian_block_size | Block size of Hessian of log likelihood w.r.t latent Gaussian variable theta. |
| [in] | solver | Type of Newton solver. Each corresponds to a distinct choice of B matrix (i.e. application SWM formula): 1. computes square-root of negative Hessian. 2. computes square-root of covariance matrix. 3. computes no square-root and uses LU decomposition. |
| [in] | max_steps_line_search | Number of steps after which the algorithm gives up on doing a line search. If 0, no linesearch. |
| [in,out] | msgs | stream for messages from likelihood and covariance |
Definition at line 57 of file laplace_marginal_bernoulli_logit_lpmf.hpp.