ourceCode stan code-with-copy"><code class="sourceCode stan"><span id="cb11-1"><a href="#cb11-1" aria-hidden="true" tabindex="-1"></a>y ~ normal(mu, sigma);</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<p>The vectorized form is also more efficient because Stan can unfold the computation of the chain rule during algorithmic differentiation.</p>
<p>Stan also allows for arrays of vectors and matrices. For example, in a hierarchical model might 