>#&gt; #   .mar.fitted &lt;dbl&gt;</span></code></pre></div>
</div>
<div id="three-level-models" class="section level3">
<h3 class="hasAnchor">
<a href="#three-level-models" class="anchor"></a>Three-level models</h3>
<p>In three-level models, how we specify middle-level residuals changes depending on whether a model is a <code>lmerMod</code> or <code>lme</code> object. This is due to differences in how <code>lme4</code> and <code>nlme</code> store their grouping factors To demonstrate this, we use a classro