title: Visualising the effect of a continuous predictor on a dichotomous outcome using ggplot2
body: <p>My dataset has two columns.
  Column 1: a dichotomous variable - 'Yes' or No'.
  Column 2: a continuous predictor, which ranges from 3 - 6.</p>
  <p>In base R, I can easily visualise the effect of this continuous predictor on the probability of achieving said dichotomous outcome, by simply using <code>plot(outcome~predictor)</code>. If I do so, I get a graph that looks something like this:</p>
  <p><a href="https://i.stack.imgur.com/Hm0xm.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Hm0xm.png" alt="Base r plot" /></a></p>
  <p>I am unable to replicate this type of plot using ggplot2, nor find any examples of other people using what looks like to me a simple way to visualise the data. If anyone would be able to explain how I can produce this plot using ggplot2 I'd be most grateful.</p>