</code></pre></div>
<p>We’ll use a simple example regression model based on the built-in <code>mtcars</code> dataset:</p>
<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r">x &lt;-<span class="st"> </span><span class="kw">lm</span>(mpg <span class="op">~</span><span class="st"> </span>cyl <span class="op">+</span><span class="st"> </span>hp <span class="op">*</span><span class="st"> </span>wt, <span class="dt">data =</span> mtcars)</code></pre></div>
<p>To obtain average marginal