 vectorizing the
sampling statement in the model block. Vectorizing the calculation of
the <span class="math inline">\(\epsilon_t\)</span> could also be sped up by using a dot product instead
of a loop.</p>
</div>
<div id="vectorized-maq-model" class="section level3 unnumbered">
<h3>Vectorized MA(Q) Model</h3>
<p>A general <span class="math inline">\(\mbox{MA}(Q)\)</span> model with a vectorized sampling probability
may be defined as follows.</p>
<pre><code>data {
  int&lt;lower=0&gt; Q;  // num previous no