I'm plotting a model with two categorical variables, each with 2 categories. My attempt is to have something like the below:
Instead what I have is this:
Here is my code:
install.packages("sjstats")
library(sjstats)
install.packages("sjPlot")
library(sjPlot)
plot_model(my_model, type = "pred", terms = c("Language", "Switching"),
axis.title = "Response Times (log)", legend.title = "Condition",
colors = "Set2", dot.size = 3, line.size = 1.5, ci = TRUE, ci.lvl = 0.95)
Sorry for not being able to share the model or a small reproducible part of it, but I'm not able to subset from it using dput
and I'm not yet able to share the whole dataset on here.
My issue is more in the arguments that I'm using to show the whiskers of the plot the confidence intervals but they don't seem to work for some reason. Also, any suggestions on how to get the vertical line? vline
arguments don't work either...
EDIT: After editing with the suggested code below by neilfws, this is what I get: