 effects (AMEs), we simply call <code><a href="../reference/margins.html">margins()</a></code> on the model object created by <code>lm()</code>:</p>
<div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw"><a href="../reference/margins.html">margins</a></span>(x)</code></pre></div>
<pre><code>## Average marginal effects</code></pre>
<pre><code>## lm(formula = mpg ~ cyl + hp * wt, data = mtcars)</code></pre>
<pre><code>##      cyl       hp     wt
##  -0.3652 -0.02527 -3.8