Forest plot for meta-analysis displaying the mean ES with and without outliers

I am conducting a meta-analysis and am trying to produce a forest plot displaying the mean weighted effect size with and without the outliers. I looked on so many websites and tried a lot of syntaxes, however, didn't really find anything about what I am looking for.

Assume there are 10 studies in the meta-analysis. Outlier analyses showed that Study 3 is an outlier leading to an overestimation of the mean weighted ES. Accordingly, I calculate a mean ES with (k = 10) and without the outlier (k = 9). I would like to display the studies sorted according to their ES and report both Mean ESs in the forest plot. I would appreciate any help and/or advice.

Study3 Study9 Study5 ... Study7

Mean ES (k = 10) Mean ES (k = 9)

-
I also tried to produce a graphs as the link below metafor-project.org/doku.php/plots:forest_plot_with_subgroups however, suddenly, the program didn't show the graphs in the output anymore after I used the command dev.off(). The graphs was saved on my computer, but I would prefer to see the graph in the output (I use R Studio) before I save it. How can I change it back? –  Natalie Jul 11 at 5:27

You missed metafor's function addpoly(). Here is a fully reproducible example:

library(metafor)

data(dat.bcg)

## REM (k = 13)
res <- rma(ai=tpos, bi=tneg, ci=cpos, di=cneg, data=dat.bcg, measure="RR",
slab=paste(author, year, sep=", "), method="REML")

## REM (k = 11; 'outliers' removed)
res2 <- rma(ai=tpos, bi=tneg, ci=cpos, di=cneg, data=subset(dat.bcg, trial < 12),
measure="RR", slab=paste(author, year, sep=", "), method="REML")

## Forest plot
forest(res, xlim=c(-16, 6), at=log(c(.05, .25, 1, 4)), atransf=exp,
ilab=cbind(dat.bcg$tpos, dat.bcg$tneg, dat.bcg$cpos, dat.bcg$cneg),
ilab.xpos=c(-9.5,-8,-6,-4.5), cex=.75, ylim=c(-3, 16),
order="obs", xlab="Relative Risk", mlab="RE Model for All Studies (k = 13)")

## Add second summary effect size
addpoly(res2, atransf=exp, mlab="RE Model without 'outliers' (k = 11)", cex=.75)


Here is the result:

-
Thank you very much. I reproduced the graph above, and was also able to do it with my results. So happy, it finally worked. –  Natalie Jul 12 at 5:18
@Natalie Glad that I could help! Please consider to accept my answer if it was helpful. –  Bernd Weiss Jul 12 at 7:05