 class="math inline">\(\theta\)</span>, the following program suffices.</p>
<pre><code>data {
  real&lt;lower=0,upper=1&gt; theta;
  int&lt;lower=0&gt; K;
  int&lt;lower=0&gt; N;
}
generated quantities {
  int&lt;lower=0,upper=K&gt; y[N];
  for (n in 1:N)
    y[n] = binomial_rng(K, theta);
}</code></pre>
<p>For this model, the sampler must be configured to use the fixed-parameters
setting because there are no parameters. Without parameter sampling there
is no need for adaptation and the number of warmup ite