role="main">
          <div class="page-inner">

            <section class="normal" id="section-">

<div>
This is an old version, <a href="https://mc-stan.org/docs/reference-manual/optimization.html">view current version</a>.
</div>
<div id="optimization" class="section level2" number="12.4">
<h2><span class="header-section-number">12.4</span> Optimization</h2>
<p>Optimization runs very much like sampling in that it starts by reading
the data and then initializing parameters. Unlike sampling, it
produces a