ability
and gradient calculations. Thus the following version is faster than
the original formulation as a loop over a sampling statement.</p>
<pre><code>  {
    vector[N] x_beta_ll;
    for (n in 1:N)
      x_beta_ll[n] = x[n] * beta[ll[n]];
    y ~ bernoulli_logit(x_beta_ll);
  }</code></pre>
<p>The brackets introduce a new scope for the local variable
<code>x_beta_ll</code>; alternatively, the variable may be declared at the
top of the model block.</p>
<p>In some cases, such as the above, the local varia