putes the gradient of the log density, BUGS computes the log density but not its gradient</h3>
<p>Stan uses its own C++ algorithmic differentiation packages to compute the gradient of the log density (up to a proportion). Gradients are required during the Hamiltonian dynamics simulations within the leapfrog algorithm of the Hamiltonian Monte Carlo and NUTS samplers.</p>
</section>
<section id="both-bugs-and-stan-are-semi-automatic" class="level3 unnumbered">
<h3 class="unnumbered anchored" data-anchor-id="b