Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to use -graph combine- and typical twoway options with -meta forest-

    Dear all,

    I would like to present forest plots side by side, but -meta forest- does not work well with -graph combine-: For example:

    Code:
    use https://www.stata-press.com/data/r16/bcgset, clear
    meta forestplot, esrefline nullrefline saving(part1, replace)
    meta forestplot, saving(part2, replace)
    graph combine part1.gph part2.gph
    Besides, I would like to add shaded bands in a forest plot to highlight some estimates:

    Code:
    use https://www.stata-press.com/data/r16/bcgset, clear
    meta forestplot, yline(10(0.001)11, lcolor(black*0.25))
    Does anyone have any potential solutions for these two problems?

    All the best,

    Tiago

  • #2
    Hi Tiago,

    It rather depends upon what your ultimate aim is, with your combined forest plots... but user-written metan (from SSC) could be a better solution for you. The forest plots created by metan admittedly don't look quite as nice as the Stata 16 ones, but they are built up using graph twoway, which means that (a) you can use graph combine; and (b) you can add twoway elements such as yline().

    Note in particular that the forest plot routine for metan (that is, the command forestplot)has various elements which try to make plots line up nicely: firstly, they are built up from lines of data in a dataset, including spaces for titles etc. so if the structure is the same, the plots should line up... but there are also the options savedims() and usedims() which attempt to preserve ratios, text sizes etc. across multiple plots.

    There are some basic instructions in the Stata help files, but let me know if you have any specific questions (disclosure: I am the author of these packages!)

    Best wishes,

    David.
    ​​​​​​​

    Comment


    • #3
      Hi, David.

      Thank you very much for your explanations.

      Just so you know: I have been using -metan- and -ipdmetan- frequently. Thank you SO MUCH for your time and efforts to provide the Stata community with those great meta-analysis packages.

      I will check in detail all those aspects that you pointed have out. -metan- seems the way to go.

      All the best,

      Tiago

      Comment

      Working...
      X