Announcement

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

  • meta forestplot with subgroup option

    Hello,
    I am trying to do a forestplot using the subgroup option and adding some columns. As soon as I add a column to the forestplot I loose the labels of the subgroup variable.
    Please see below for an example

    Code:
    webuse streptoset, clear
    meta forestplot if year == 1971 | year == 1973 | year == 1975 , subgroup(year) nooverall noohetstats  noohomtest noosigtest    noghetstats nogwhomtests nogbhomtests or nullrefline
    Click image for larger version

Name:	Graph1.png
Views:	1
Size:	82.8 KB
ID:	1661864



    This produces a forestplot with 1971, 1973, and 1975 as labels for the subgroup variable year

    When I use the following code, the labels (1971, 1973, 1975) of the subgroup variable (year) disappear

    Code:
    meta forestplot study _plot if year == 1971 | year == 1973 | year == 1975 , subgroup(year) nooverall noohetstats  noohomtest noosigtest    noghetstats nogwhomtests nogbhomtests or nullrefline
    Click image for larger version

Name:	Graph2.png
Views:	1
Size:	34.2 KB
ID:	1661865




    Does anyone how to retain the labels for the subgroup variable ?

    Thank you

  • #2
    Thanks for the reproducible example. You will need "_id" in place of "_study"

    Code:
    webuse streptoset, clear
    meta forestplot _id _plot if year == 1971 | year == 1973 | year == 1975 , subgroup(year) nooverall noohetstats noohomtest noosigtest noghetstats nogwhomtests nogbhomtests or nullrefline
    Click image for larger version

Name:	Graph.png
Views:	1
Size:	18.9 KB
ID:	1661892

    Comment


    • #3
      Thank you so much Andrew ! very useful. kind regards

      Comment

      Working...
      X