lacement.</em> That is, some elements of <code>y</code> may show up more than once in <code>y_rep</code> and some may not appear at all.</p>
</section>
</section>
<section id="coding-the-bootstrap-in-stan" class="level2">
<h2 class="anchored" data-anchor-id="coding-the-bootstrap-in-stan">Coding the bootstrap in Stan</h2>
<p>The bootstrap procedure can be coded quite generally in Stan models. The following code illustrates a Stan model coding the likelihood for a simple linear regression. There is a parallel