Here is the code for evaluating the log posterior predictive density in a simple linear regression of the test data <span class="math inline">\(\tilde{y}\)</span> given predictors <span class="math inline">\(\tilde{x}\)</span> and training data <span class="math inline">\((x, y).\)</span></p>
<div class="sourceCode" id="cb1"><pre class="sourceCode stan code-with-copy"><code class="sourceCode stan"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a><span class="kw">data</span> {</span>
<s