ggplot2 and GLM: plot a predicted probability
<p>I am looking for some help as to how you make a ggplot with the following data. There are several examples on stackoverflow, but they are a lot more complicated and I am having trouble figuring it out.</p>

<pre><code>library(car)
data(Chile)
Chile$yes &lt;- with(Chile, ifelse(vote == "Y", 1, ifelse(vote=="N", 0, NA))) 
Chile&lt;-na.omit(Chile)

logit1 &lt;- glm(yes ~ statusquo + age + income + sex, data = Chile, family=binomial(link="logit")) 


inject1 &lt;- data.frame(statusquo=mean(na.omit(Chile$statusquo)), income=mean(Chile$income), sex="F", age=mean(Chile$age))
predict1 &lt;- predict(logit1, newdata=inject1, type="response", se.fit=TRUE)


inject2 &lt;- data.frame(statusquo=mean(na.omit(Chile$statusquo)), income=mean(Chile$income), sex="M", age=mean(Chile$age))
predict2 &lt;- predict(logit1, newdata=inject2, type="response", se.fit=TRUE)
</code></pre>

<p>The outcome variable is "yes", x would be different in sex I suppose - I would like to plot the predictions.</p>

<p>Thanks in advance for your time and help!</p>