[R-meta] [meta] package query: Forest plot displaying the mean weighted effect size with and without the outliers(meta.cont)
Ishtiaq Ahmed
I@ht|@q@Ahmed @end|ng |rom vub@be
Thu May 11 10:52:50 CEST 2023
Dear all,
I hope you all are doing well. 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 5 studies in the meta-analysis. Outlier analyses showed that Studies 3 and 4 are outliers leading to an overestimation of the mean weighted ES. Accordingly, I calculate a mean ES with (k = 5) and without the outlier (k = 3). 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 Study4
Mean ES (k = 5) Mean ES (k = 3)
My Reproducible code:
Ishtiaq <- data.frame( nexp = c(20, 30, 25, 18, 22),
Pain_int_mean = c(-0.5, -0.8, -0.6, -1.2, -0.7),
Pain_int_sd = c(0.2, 0.3, 0.25, 0.18, 0.22),
ncon = c(18, 28, 23, 15, 20),
Pain_con_mean = c(0.3, 0.2, 0.5, 0.4, 0.6),
Pain_con_sd = c(0.15, 0.25, 0.2, 0.18, 0.22),
study_label = c("Study 1", "Study 2", "Study 3", "Study 4", "Study 5"))
# meta-analysis 1
Pain_meta <- metacont(nexp, Pain_int_mean, Pain_int_sd, ncon, Pain_con_mean, Pain_con_sd, studlab = study_label, data = Ishtiaq, sm = 'SMD', method.smd = "Hedges", method.tau = "REML")
# create forest plot
forest.meta(Pain_meta, sortvar = TE, studlab = TRUE, prediction = TRUE, test.overall.random = T, random = T, fixed = F ,label.right = "Favours control", col.label.right = "black", label.left = "Favours experimental", col.label.left = "black", col.square = "darkcyan", col.diamond = "darkblue", col.diamond.lines = "cyan4", col.predict = "red", print.tau2 = F, mlab = "RE Model for All Studies (k = 5)")
#Remove studies with TE >5
Pain_meta_out_removed <- abs(Pain_meta$TE) > 5
## Then, create the meta-analysis with outliers removed
Pain_meta_no_out = metacont(nexp, Pain_int_mean, Pain_int_sd, ncon, Pain_con_mean, Pain_con_sd, studlab = study_label, data = Ishtiaq[!Pain_meta_out_removed, ], sm = 'SMD', method.smd = "Hedges", method.tau = "REML", random = TRUE, fixed = FALSE)
#add the effect size to the forest plot
????????
The addpoly works in metafor() package but I like the plots produced by forest.meta() and it is easy to handle So, I want to ask if there is any option in the meta() package to add a polygon for ES with and without outliers?
Thanks in advance.
Best regards,
Ishtiaq Ahmed
[[alternative HTML version deleted]]
More information about the R-sig-meta-analysis
mailing list