Announcement

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

  • Meta Forestplot with Subgroup plots only (how to hide studies)

    Hello All
    I have a dataset with about 470 studies coded, which I intend to use for metaanalysis by meta.
    I want to use a single variable for subgrouping.
    Plot meta forestplot, subgroup(x) is of course too large to be displayed ('graph height too big; too many studies' error).
    I want to display only the subgroup summaries - as is done by default, when you use more subgrouping variables at once.
    I tried to play with marker and itemopts settings, but haven't succeeded.

    Thanks for any help!
    Adam

  • #2
    Hi Adam - did you ever figure this out? I am having the same issue.
    Best,
    Alison

    Comment


    • #3
      Hello Alison El Ayadi. I don't remember seeing Adam Rybak's post (#1) in 2020. But what occurs to me now is that you could try -meta regress- with a categorical explanatory variable (your sub-group variable), and then follow up with -margins- and -marginsplot-. It won't be the conventional forest plot you're thinking of, but it might show what you want to show in a reasonable manner. Just a thought!
      --
      Bruce Weaver
      Email: [email protected]
      Version: Stata/MP 19.5 (Windows)
      Crypticity belongs in crosswords, not code! 🤨

      Comment


      • #4
        Apart from Bruce's useful reply, a workaround to #1 is to create an "overall" subgroup by defining a group that includes all studies and then suppressing the default overall statistic. You can then use the graph editor to suppress the variable name and the test statistic associated with this overall group, as it is not relevant.

        Code:
        webuse bcgset, clear
        meta forestplot, subgroup(alloc)
        
        gen o=1
        lab values o o
        label define o 1 "{bf: Overall}", modify
        meta forestplot, subgroup(alloc o) nooverall
        gr_edit .plotregion1.column1.group_items[2].text = {}
        gr_edit .plotregion1.column1.bhom_stats[2].text = {}
        Click image for larger version

Name:	Graph1.png
Views:	1
Size:	68.7 KB
ID:	1786580

        Click image for larger version

Name:	Graph.png
Views:	1
Size:	65.5 KB
ID:	1786581

        Last edited by Andrew Musau; 10 Jul 2026, 10:43.

        Comment

        Working...
        X