Stan development repository. The master branch contains the current release. The develop branch contains the latest stable development. See the Developer Process Wiki for details.
Currently, when drawing from the Laplace approximation, log_p and log_q are always evaluated for each draw. log_p and log_q are useful for diagnosing the accuracy of the Laplace approximation, but there are cases where we trust that the normal approximation at the mode is sufficient and then we would not need log_p and log_q, and evaluation of log_p for all draws usually takes much more time than finding the mode, computing hessian, and drawing from the normal take. So it would be useful to make it optional and output just 0 or NA to the csv when the user so requests.
Summary:
Currently, when drawing from the Laplace approximation, log_p and log_q are always evaluated for each draw. log_p and log_q are useful for diagnosing the accuracy of the Laplace approximation, but there are cases where we trust that the normal approximation at the mode is sufficient and then we would not need log_p and log_q, and evaluation of log_p for all draws usually takes much more time than finding the mode, computing hessian, and drawing from the normal take. So it would be useful to make it optional and output just 0 or NA to the csv when the user so requests.
The relevant part in Stan services is https://github.com/stan-dev/stan/blob/3c2b7bad93e37e787fd456e712996b19ef84de1f/src/stan/services/optimize/laplace_sample.hpp#L110
Naturally the change would need to make also in stan/arguments, cmdstan, and other interfaces, too
Current Version:
v2.32.2