community, I have a problem with a plot for my meta analysis with moderators. Unfortunately my error bars overlap. Which is why I am searching for an opportunity to shift my lines a few inches. I know the dodge.position function in ggplot. Is there a similar function in the "normal" plot function?
This is my code:
plot(coef.rma(meta_LGOOCBdimension_MI)[1:3], type="o", pch=19, ylim=c(0, 1.2),
xlab="OCB Dimension", ylab="Standardized Correlation", xaxt="n", bty="l")
arrows(x0=1:3, y0=coef(summary(meta_LGOOCBdimension_MI))$ci.lb[1:3], x1=1:3,
y1=coef(summary(meta_LGOOCBdimension_MI))$ci.ub[1:3], code=3, angle=90, length=0.05)
axis(side=1, at=1:3, labels=c("OCB-I","OCB-O","OCB-CH"))
lines(coef.rma(meta_LGOOCBdimension_MI)[4:5], type="o", pch=15, lty="dotted")
arrows(x0=1:2, y0=coef(summary(meta_LGOOCBdimension_MI))$ci.lb[4:5], x1=1:2,
y1=coef(summary(meta_LGOOCBdimension_MI))$ci.ub[4:5], code=3, angle=90, length=0.05)
lines(coef.rma(meta_LGOOCBdimension_MI)[6:8], type="o", pch=17, lty="dashed")
arrows(x0=1:3, y0=coef(summary(meta_LGOOCBdimension_MI))$ci.lb[6:8],
x1=1:3, y1=coef(summary(meta_LGOOCBdimension_MI))$ci.ub[6:8],
code=3, angle=90, length=0.05)
legend("topright", legend=c("vandewalle", "button", "other"),
lty=c("solid", "dotted", "dashed"), pch=c(19,15, 17))
title("Estimated Average Effects based on the Interaction Model")
Which leads to this output: