</code> are constrained to be
non-negative, and have a weakly informative prior given in the model
chosen to avoid zero values and thus collapsing components.</p>
<p>The model declares a local array variable <code>lps</code> to be size
<code>K</code> and uses it to accumulate the log contributions from the
mixture components. The main action is in the loop over data points
<code>n</code>. For each such point, the log of <span class="math inline">\(\theta_k * \mathsf{normal}(y_n \, | \, \mu_k,\sigma_k)\)</sp