I've fitted a logistic regression model that predicts the a binary outcome vs
from mpg
(mtcars
dataset). The plot is shown below. How can I determine the mpg
value for any particular vs
value? For example, I'm interested in finding out what the mpg
value is when the probability of vs
is 0.50. Appreciate any help anyone can provide!
model <- glm(vs ~ mpg, data = mtcars, family = binomial)
ggplot(mtcars, aes(mpg, vs)) +
geom_point() +
stat_smooth(method = "glm", method.args = list(family = "binomial"), se = FALSE)