code>theta</code> given
the example bernoulli model and data, following the
<a href="https://mc-stan.org/docs/stan-users-guide/posterior-prediction.html#posterior-predictive-simulation-in-stan">posterior predictive simulation</a>
procedure in the Stan User’s Guide.</p>
<p>We write a program <code>bernoulli_ppc.stan</code> which contains
the following generated quantities block, with comments
to explain the procedure:</p>
<pre><code>generated quantities {
  real&lt;lower=0,upper=1&gt; theta_rep;
  int y_si