Announcement

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

  • metan - Adding 'by' command equivalent to a 'first' command forest plot

    Hi there,

    I'm making forest plots with pre-computed data with the 'first' command -- (StataIC 12)

    first(estimates and description) (v9 update) Use of this command completely changes the way metan operates, as results are no longer based on any standard methods. The user defines their own estimate, 95% CI and description as in the above, and must supply their own weightings using wgt(weightvar) to control display of box sizes. Note that data must be supplied in the 2 or 3 variable syntax (theta se_theta or es lci uci) and by may not be used used for obvious reasons. [I'm not sure what these obvious reasons are...]
    The 'by' command is normally used to stratify the data into subgroups, eg here: http://www.neurologyindia.com/articl..._132323_u6.jpg

    1. Is there a way I can stratify the data into subgroups without using the 'by' command? ie to avoid having to do separate forest plots and pasting them together in an imaging program

    The syntax I'm using:

    . metan HG lci uci, lcols(Study Year) xlabel(-2, -1.5, -1, -0.5, 0, 0.5, 1, 1.5, 2) wgt(weight) first(0.189 0.002 0.377 _)


    Edit - 2. Also, unrelatedly - is there a way to add in text next to/near the "Overall" text (which is automatically generated by the program)? I'd like to include a Q-statistic in the plots, à la the below (deleted study names)

    Last edited by Jane Lane; 03 Jan 2016, 08:00.

  • #2
    For those new to this, first is an option on the metan command, rather than a command in its own right.
    Last edited by William Lisowski; 03 Jan 2016, 11:26.

    Comment


    • #3
      Hello Jane,

      Welcome to the Stata Forum,

      You asked: "Is there is a way I can stratify the data into subgroups without using the 'by' command?". Also, you wished "to add in text next to/near the 'overall' text"" and you'd like "to include a Q-statistic in the plots" as well.

      Actually, I've used - metan - but not with the "first" option. Therefore, due to my lack of expertise on this specific topic, I decided to take a look at a benchmark article on - metan - (http://www.stata-journal.com/sjpdf.h...clenum=sbe24_2). Here's an excerpt that will probably shed light on your query:

      Pooled estimates may be derived by using another package and presented in a forest plot by using the first() option to supply these to the metan command. Here wgt(wgtvar) is used merely to specify box sizes in the forest plot, no heterogeneity statistics are produced, and no values are returned. When using this feature, stratified analyses are not allowed. An alternative method is to provide the user-supplied meta-analytic estimate by using the second() option. Data are analyzed by using standard methods, and the resulting pooled estimate is displayed together with the user-defined estimate (which need not be derived by using metan), allowing a comparison. When using this feature, the option nosecsub is invoked, as stratification using the user-defined method is not possible. When these options are specified, the user must supply the pooled estimate with its standard error or CI and a method label. The user may also supply text to be displayed at the bottom of the forest plot, in the position normally given to heterogeneity statistics, using firststats(string) and secondstats(string).
      Hopefully that helps.

      Best,

      Marcos
      Last edited by Marcos Almeida; 03 Jan 2016, 15:22.
      Best regards,

      Marcos

      Comment


      • #4
        Hi Marcos, William

        Thank you very much for the advice - it's been very useful.

        In fact, the only real problem I have now is that when the dataset includes all 100 observations, the graph becomes unreadable (attached). It looks okay with 40-50 observations.

        Is there a way to resize this? I've tried changing aspect ratio and Ysize and Xsize, even to extreme values, but the plot barely changes.

        Syntax: metan hg lci uci, lcols(Study Year) xlabel(-2, -1.5, -1, -0.5, 0, 0.5, 1, 1.5, 2) wgt(rweight) second(0.125 -0.033 0.282 _) by (Measure) sgweight boxsca(50) texts(150) nooverall

        Stata 12 IC

        Attached Files

        Comment

        Working...
        X