I am studying how long it takes for individuals diagnosed with a psychiatric condition, compared to healthy individuals, to detect fearful, happy and neutral emotional faces.
I am performining analysis with Generalized Linear Mixed Model, and the best-fitting model was the following:
gmod3.5 <- glmer(rt ~ Group * Emotion + trialnum2 +(1+Emotion|ID)+(1|Actor), data=CFS_21, family=Gamma(link="identity"))
The factor group has two levels (SZ, CG), the factor emotion has tree leves (F, H, N) and age is centered.
For the plot, I wrote the following code:
set_theme(base = theme_classic(), #To remove the background color and the grids
axis.title.size = 1.0, #To change axis title size
axis.textsize.x = 1.0, #To change x axis text size
axis.textsize.y = 1.0,
legend.item.backcol = "white",
legend.item.bordercol = "white",
legend.backgroundcol = "white",
legend.inside = TRUE)
p<-plot_model(gmod3.5, type = "int", vars = c("Emotion", "Group", "trialnum2"),
title="Response time per group considering the emotion",
colors = "Set2",
show.values = TRUE,
value.offset = .2,
value.size = 2,
dot.size = 2,
line.size = 1,
width = 1)
p + scale_y_continuous(limits = c(0, 4), breaks = c(0, 1, 2, 3, 4))
However, I need to use CI for the error bars and to make the groups (CG and SZ) closer to each other
Does anyone known how to do this using the plot_model function?