[R-meta] Forest Plot with Broken X-axis
Michael Dewey
||@t@ @end|ng |rom dewey@myzen@co@uk
Tue Apr 25 16:25:35 CEST 2023
There are various stand-alone packages for forest plots on CRAN. I think
forestmodel using ggplot2 so may be customisable by you. Based on grid
is forestploter which may help if you can construct your own grob. The
forestplot package looks less obviously customisable (at least to me).
Michael
On 25/04/2023 14:26, Viechtbauer, Wolfgang (NP) via R-sig-meta-analysis
wrote:
> Please always cc the mailing when responding.
>
> Maybe Guido or Gerta have an idea how this can be accomplished with the meta package.
>
> Best,
> Wolfgang
>
>> -----Original Message-----
>> From: Elmira Agah [mailto:elmira.agah using yahoo.com]
>> Sent: Tuesday, 25 April, 2023 14:55
>> To: Viechtbauer, Wolfgang (NP)
>> Subject: Re: [R-meta] Forest Plot with Broken X-axis
>>
>> Dear Wolfgang,
>>
>> Thanks for your kind response. I need to update a meta-analysis performed by
>> Sferruzza et al. 2018 as part of my biomarker meta-analysis project. The authors
>> designed a very nice forest plot, which I have attached to this email. My
>> curiosity about how to do this is piqued because I've never seen one before.
>> Kind regards,
>> Elmira
>>
>> On Tuesday, April 25, 2023 at 03:25:01 PM GMT+3:30, Viechtbauer, Wolfgang (NP)
>> <wolfgang.viechtbauer using maastrichtuniversity.nl> wrote:
>>
>> Dear Elmira,
>>
>> Thanks for the reproducible example.
>>
>> Why not just restrict the x-axis to:
>>
>> forest(m.gen, xlim=c(-4,4))
>>
>> This aside, even without knowing further details, I would highly question the
>> results from that one study. For SMDs, a value of 22.66 is just not very
>> plausible. A common issue is that SEs are reported / extracted as SDs, in which
>> case the SMD value will be much larger than it should be.
>>
>> Best,
>> Wolfgang
>>
>>> -----Original Message-----
>>> From: R-sig-meta-analysis [mailto:r-sig-meta-analysis-bounces using r-project.org] On
>>> Behalf Of Elmira Agah via R-sig-meta-analysis
>>> Sent: Tuesday, 25 April, 2023 11:37
>>> To: R. Special Interest Group for Meta-Analysis
>>> Cc: Elmira Agah
>>> Subject: [R-meta] Forest Plot with Broken X-axis
>>>
>>> Dear All,
>>>
>>> I recently conducted a meta-analysis with R. I just have a problem with the
>>> forest plot. One study has a large CI, ranging from 19.51 and 25.8, and all the
>>> other CIs are within the range of 0-4. I want a broken X-axis in my forest plot
>>> in R like this: -4 -2 0 2 4 // 19 26. I am looking for something like the
>>> "scale_x_break" function in ggplot2. Although I tried different codes using meta
>>> and metafor packages, I was unable to achieve the desired result. I would be so
>>> grateful if you could help me with this matter.
>>>
>>> Best regards,
>>> Elmira
>>>
>>> My meta-analysis codes:
>>>
>>> library(meta)
>>>
>>> dat <- data.frame(
>>> study = paste0("Study ", 1:28),
>>> TE = c(1.8984493, 1.9640685, 3.385263, 1.5659699, 1.5652673, 2.0562171,
>>> 0.90219091, 1.0524363, 1.6363198, 2.5232341, 1.4043242, 22.657853, 0.87843556,
>>> 1.3282301, 1.4646563, 2.1925217, 1.2424619, 1.5610836, 0.95507323, 2.3782448,
>>> 2.091292, 1.3451607, 1.2803401, 1.2762723, 2.2864191, 1.5650263, 1.322427,
>>> 1.1478108),
>>> seTE = c(0.39444893, 0.23328417, 0.29290805, 0.31463743, 0.27502685,
>> 0.30539049,
>>> 0.19348406, 0.19364049, 0.18319501, 0.27044267, 0.2233634, 1.6045138,
>> 0.22649919,
>>> 0.2278701, 0.18908331, 0.33892975, 0.2025052, 0.21445296, 0.3667024, 0.21882009,
>>> 0.36644467, 0.35341581, 0.24426106, 0.27919891, 0.44557554, 0.26745864,
>>> 0.29847459, 0.25620054),
>>> ci.lb = c(1.1253436, 1.5068399, 2.8111738, 0.94929185, 1.0262246, 1.4576628,
>>> 0.52296911, 0.67290787, 1.2772642, 1.9931762, 0.96653999, 19.513064, 0.4345053,
>>> 0.88161292, 1.0940598, 1.5282316, 0.845559, 1.1407635, 0.23634973, 1.9493653,
>>> 1.3730736, 0.65247847, 0.80159719, 0.72905251, 1.413107, 1.040817, 0.73742752,
>>> 0.64566693),
>>> ci.ub = c(2.671555, 2.4212971, 3.9593523, 2.1826479, 2.10431, 2.6547715,
>>> 1.2814127, 1.4319646, 1.9953755, 3.053292, 1.8421084, 25.802642, 1.3223658,
>>> 1.7748473, 1.8352528, 2.8568118, 1.6393648, 1.9814037, 1.6737967, 2.8071243,
>>> 2.8095103, 2.037843, 1.759083, 1.8234921, 3.1597311, 2.0892356, 1.9074264,
>>> 1.6499546))
>>>
>>> m.gen <- metagen(TE = TE,
>>> seTE = seTE,
>>> studlab = study,
>>> data = dat,
>>> sm = "SMD",
>>> comb.fixed = FALSE,
>>> comb.random = TRUE,
>>> method.tau = "DL",
>>> )
> _______________________________________________
> R-sig-meta-analysis mailing list @ R-sig-meta-analysis using r-project.org
> To manage your subscription to this mailing list, go to:
> https://stat.ethz.ch/mailman/listinfo/r-sig-meta-analysis
>
--
Michael
http://www.dewey.myzen.co.uk/home.html
More information about the R-sig-meta-analysis
mailing list