href="../reference/margins.html">margins</a></span>(x)</code></pre></div>
<pre><code>## Average marginal effects</code></pre>
<pre><code>## lm(formula = mpg ~ factor(cyl) * hp + wt, data = mtcars)</code></pre>
<pre><code>##        hp    wt  cyl6   cyl8
##  -0.04475 -3.06 1.473 0.8909</code></pre>
<p><code><a href="../reference/margins.html">margins()</a></code> recognizes the factor and displays the marginal effect for each level of the factor separately. (Caveat: this may not work with certain <code>at</co