Announcement

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

  • Creating forest plots from precomputed data

    Hi all,

    1. Is it possible to create forest plots from precomputed data? I'm not sure what syntax to use (I'm unfamiliar with Stata - more familiar with SAS).

    I have Study name, Year, Hedge's G, LCI, UCI, Weight. I also have these data for the Overall effect estimate (so don't need Stata to calculate the diamond).

    I optimistically tried this command, which Stata rejected: . metan hg _LCI _UCI _WT, rr lcols (name year) xlabel (-2, -1.5, -1, -.05, 0, 0.5, 1, 1.5, 2)


    2a. For the funnel plot, I used this command with precomputed data, with success: . metafunnel hg _SE, xtitle (Hedge's G) ytitle (Standard Error)

    Looking at the funnel plot, some values seem off, but I might be imagining things. Is there any reason the above command would be incorrect (eg, maybe data needs to be transformed into a log scale)?

    2b. I can't get the funnel plot to calculate the Egger regression test for funnel-plot asymmetry. Going off the syntax here: . metafunnel logor selogor, xtitle(Log odds ratio) ytitle(Standard error of log OR)
    > egger

    When I type variations of "> egger", the "unrecognised command" error comes up.

    Many thanks for any help

  • #2
    Don't type the ">".
    Code:
    metafunnel logor selogor, xtitle(Log odds ratio) ytitle(Standard error of log OR) egger

    Comment


    • #3
      Thanks -- it's saying 'option not allowed' when I try that though. Do you know why that might be?

      Sorry if these are basic questions - I'm doing this for work and haven't been given much time to familiarise myself with the software before the deadline

      Comment


      • #4
        You are probably using the wrong version of metafunnel. You have to install package st0061 from http://www.stata-journal.com/software/sj4-2.
        Code:
        findit st0061
        Please also review the FAQ, in particular section 12.

        Comment


        • #5
          Hi Jane,

          For your first question, type "help metan" at the command line to bring up the documentation, and look for the option first(). This, together with the wgt() option, allows you to supply your own overall effect estimate and weighting. Going by the code you supplied, I'd guess the correct code would be something like:
          Code:
          metan hg _LCI _UCI, rr lcols(name year) xlabel(-2, -1.5, -1, -.05, 0, 0.5, 1, 1.5, 2) wgt(_WT) first(x.xxx y.yyy z.zzz My Overall Estimate)
          where x.xxx, y.yyy and z.zzz represent the effect size, LCI and UCI of your user-defined overall estimate.

          Oh, and I'm assuming _LCI, _UCI and _WT are the names of existing variables in your dataset. It may be worth re-naming these to, say, lci, uci and wt, since metan is an old program and one of its idiosyncrasies is to sometimes delete any variables it wants to use itself (which include variables named _LCI, _UCI and _WT), rather than re-using existing ones or exiting with an appropriate error message.
          Last edited by David Fisher; 16 Dec 2015, 07:35. Reason: ETA last sentence

          Comment


          • #6
            I confirm that I could create the graph on page 136 of this Stata Journal article (see post #1) after installing package st0061 (see post #4) and running the commands below.
            Code:
            * Example generated by -dataex-. To install: ssc install dataex
            clear
            input byte trial str12 trialnam int(year dead1 alive1 dead0 alive0)
             1 "Morton"       1984    1    39    2    34
             2 "Rasmussen"    1986    9   126   23   112
             3 "Smith"        1986    2   198    7   193
             4 "Abraham"      1987    1    47    1    45
             5 "Feldstedt"    1988   10   140    8   140
             6 "Schechter"    1989    1    58    9    47
             7 "Ceremuzynski" 1989    1    24    3    20
             8 "Singh"        1990    6    70   11    64
             9 "Pereira"      1990    1    26    7    20
            10 "Schechter"       1 1991     2   87    12
            11 "Golf"         1991    5    18   13    20
            12 "Thogersen"    1991    4   126    8   114
            13 "LIMIT-2"      1992   90  1069  118  1039
            14 "Schechter"       2 1995     4  103    17
            15 "ISIS-4"       1995 2216 26795 2103 26936
            end
            
            generate or = (dead1/alive1)/(dead0/alive0)
            generate logor = log(or)
            generate selogor = sqrt((1/dead1)+(1/alive1)+(1/dead0)+(1/alive0))
            
            metafunnel logor selogor, xtitle(Log odds ratio) ytitle(Standard error of log OR) egger

            Comment

            Working...
            X