Announcement

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

  • meta forestplot: no subgroup titles

    I'm running -meta forestplot- (which I like) on the attached data. I have two subgroups. By default the command puts a title above each subgroup's forestplot, but when I add detail to the command the subgroup titles go away. Here's an illustration. How can I get subgroup titles by modifying the last command? Many thanks!

    Code:
    cls
    cd "~\Box Sync\Replicability\Red flags in meta-analysis\"
    import delimited "Meta-analysis input.csv", clear
    gen se = (ucl-lcl) / (2*invnormal(.975))
    gen Authors = author + " et al."
    replace conflict = conflict + "."
    
    meta set effect se
    
    /* This command shows subgroup titles. */
    meta forestplot, random(dlaird) subgroup(longdv)
    
    /* But this does not. */
    meta forestplot Authors year patientstreated patientscontrol dosegday durationweeks _plot _esci conflict, random(dlaird) ///
    nullrefline(favorsleft("better with collagen")) subgroup(longdv) columnopts(conflict, justification(left)) ///
    coltitleopts(justification(left)) sort(patientstreated)
    Attached Files

  • #2
    I didn't try to download or use your datafile. Since you are manually specifying columns to display, your first column must be _id, which not only includes the study labels that were set with -meta esize- but will also include the text for subgroups and heterogeneity statistics. Here's a minimal example to show the difference.


    Code:
    webuse bcg, clear
    summ latitude, meanonly
    
    label def clathigh 0 "Below average lat." 1 "Above average lat."
    gen byte lathigh = latitude > r(mean)
    label values lathigh clathigh
    
    meta esize npost nnegt nposc nnegc, esize(lnrratio)
    
    * basic forestplot with subgroups
    meta forestplot, eform subgroup(lathigh)
    
    * this also works
    meta forestplot _id _plot _esci , subgroup(lathigh)
    
    * titles and het stats are gone
    meta forestplot _plot _esci , subgroup(lathigh)

    Comment


    • #3
      Thanks! That got me the group titles, but now I have 2 new problems, as shown below.
      (1) The group titles are long and push everything else way to the right. I'd prefer to have the group titles span the columns instead of taking up a column of their own.
      (2) The output shows study numbers (Study 5, Study 9, etc.) which are arbitrary and useless. Any way to get rid of those?
      Many thanks for any further suggestions.....

      Click image for larger version

Name:	Forest plot.PNG
Views:	1
Size:	67.0 KB
ID:	1629164

      Comment


      • #4
        You're welcome. On (1), there doesn't appear to be a facility to span the text, nor does the trick of sometimes wrapping text in quotes to span lines. Here then you will need to make shorter value labels for the subgroup variable.

        (2) was touched on in #2 already. Set the study label with the -studylabel()- option when setting up the meta-analysis using -meta esize- or -meta set-. This variable gets dragged along into the _id column, which means you can drop Author and Year in your example. I will often just make a study label variable follow the format "First author name (year)" and then enforce that sort order using the -sort()- option of -meta forestplot-.

        Comment


        • #5
          OK, thanks. I kinda like the long, informative labels, so I think I'll just paste them in in Paint or something afterwards. Very helpful, thanks.

          Comment

          Working...
          X