I have a dataset of choices on a task (either 1 or 0) given a variable x. To use mtcars as an example
#binomial_smooth() from https://ggplot2.tidyverse.org/reference/geom_smooth.html
binomial_smooth <- function(...) {
geom_smooth(method = "glm", method.args = list(family = "binomial"), ...)
}
#plot
ggplot(data = mtcars, aes(x = disp, y = am)) + geom_point(alpha = 0.5) + binomial_smooth()
#create a model
model <- glm(am ~ disp, family = "binomial", data = mtcars)
where am would be the subjects choices and disp the x variable. I'd like to work out the value of x +/- SE (which I imagine is what binomial_smooth is plotting though I could be wrong) for the binary variable = 0.5.
Using mtcars, I'd like to find out for which disp +/- SE am = 0.5. Looked around and just been getting more confused so any help would be much appreciated!
best,