orresponds to using a posterior mean estimator, <span class="math display">\[\begin{eqnarray*}
\hat{y}^{\textrm{test}}
&amp; = &amp; \mathbb{E}\left[ y^{\textrm{test}} \mid x^{\textrm{test}}, x^{\textrm{train}} y^{\textrm{train}} \right]
\\[4pt]
&amp; \approx &amp; \frac{1}{M} \sum_{m = 1}^M \hat{y}^{\textrm{test}(m)}.
\end{eqnarray*}\]</span></p>
<p>Because the test set is constant and the expectation operator is linear, the posterior mean of <code>err</code> as defined in the Stan program will be the erro