How to plot glm model coefficients with abline in R?
<p>I'm struggling to plot the cofficients of an glm model using <code>abline</code>. Lets take this simple 2D example:</p>

<pre><code>d &lt;- iris[51:150, c(3:4,5)]
d[,3] &lt;- factor(d[,3])
plot(d[,1:2], col=d[,3])
</code></pre>

<p><a href="https://i.stack.imgur.com/tlUy0.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/tlUy0.png" alt="The data"></a></p>

<p>The glm model yields 4 coefficients: </p>

<pre><code>m &lt;- glm(formula = Species~Petal.Length*Petal.Width, data = d, family = "binomial")
m$coefficients
# (Intercept)             Petal.Length              Petal.Width Petal.Length:Petal.Width 
#  -131.23813                 22.93553                 63.63527                -10.63606 
</code></pre>

<p>How to plot those with a simple <code>abline</code>?</p>