inline">\([\alpha, \ldots, \alpha]^{\top}\)</span>. To
code this in Stan,</p>
<pre><code> data {
   int&lt;lower = 1&gt; K;
   real&lt;lower = 0&gt; alpha;
 }
 generated quantities {
   vector[K] theta = dirichlet_rng(rep_vector(alpha, K));
 }</code></pre>
<p>Taking <span class="math inline">\(K = 10\)</span>, here are the first five draws for <span class="math inline">\(\alpha = 0.001\)</span>.
For <span class="math inline">\(\alpha = 1\)</span>, the distribution is uniform over simplexes.</p>
<pre><code> 