I'm trying to produce a marginal effects plot from a logistic regression I ran, using plot_model (sjPlot), from publicly available survey data. The predictor for the plot is binary (male or female) and the response variable is whether a respondent votes for a Green party.
This is the code:
logit3 %>%
plot_model(
type = "pred",
terms = "female"
) +
labs(
x = "Gender",
y = "Predicted probability of voting Green",
title = "Predicted probability of voting Green by gender"
)
And this is the plot:
The plot produces fine but, since this is a binary predictor, I would like it as two separate points (for male and female), with confidence intervals, rather than than a linear line between the two.
I'm sure this has an easy answer and that I'm just being stupid, but I can't seem to find anything online. I also haven't posted much on this forum, so please let me know if I need to provide anything else.
Thanks