Announcement

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

  • Meta-analysis commands; Metainf and metatrim vil not run

    Hi!

    I'm a medical student and brand new to Stata and supposed to do a meta-analysis..
    I was told I need the following meta-analysis commands: metan7, metabias6, metafunnel, metainf, metatrim, metacum and metan. I have sucessfully installed and run analysis with metabias6, metafunnel and metacum, but I'm not able to run metainf or metatrim. I have really tried to make sure I have the last version but still it seems I cannot run them whatever i do.

    The last thing I ended up doing instead was to download all the meta-analysis commands available in "Meta-Analysis in Stata: An updated Collection from the Stata Journal, second edition" (https://www.stata.com/bookstore/meta-analysis-in-stata/). I first ran the command net from http://www.stata-press.com/data/mais2 and then the command net install mais2. As i already had some commands installed(had tried to install each command one by one) I needed to update these by typing command adoupdate. Stata then recommended me to type ado update, update. Stata replies "Cleaning up... Done". I then type update command to just to check if there are new updates. Stata tells me I have all new updates

    Still both metainf and metatrim will not run.
    When I run metainf Stata replies "subcommand meta logrr is unrecognized"
    When I run metatrim Stata replies "subcommand meta __000005 is unrecognized"
    The commands I'm trying to run look like this(this has been written by my counsellor who really is an expert in this):

    gen double logrr = log(rr)
    gen double loglb = log(cilow)
    gen double logub = log(ciupper)
    gen double selogrr = ((logub - loglb)/(2*invnorm(.975)))

    gsort -year + author

    metan7 logr loglb logub , eform random label( namevar=author ) ///
    effect(Relative Risk) ///
    xlabel(0.25, 0.5, 0.75, 1, 1.5, 2, 3, 5) ///
    force xtick(0.25, 0.5, 0.75, 1, 1.5, 2, 3, 5) nowt graph

    metabias6 logrr selogrr, graph(begg)

    metafunnel logrr selogrr, mlabel(author)

    metafunnel logrr selogrr

    metainf logrr selogrr, random print eform id(author)

    metatrim logrr selogrr, f reffect eform

    gsort +year + author

    metacum logrr selogrr, eform xlabel(0.25, 0.50, 0.75, 1.00, 1.50, 2.00, 3.00, 5.00) ///
    force xtick(0.25, 0.50, 0.75, 1.00, 1.50, 2.00, 3.00, 5.00) label(namevar=author)

    I have the following versions of the commands installed:
    metan7 (only 1 version)

    metabias6(only 1 version)

    metafunnel (SJ-4-2- st0061, Sterne and Harbord)

    metainf (STB-56 sbe26_1)

    metatrim (STB-61 sbe39_2)

    metacum (SJ9-1 sbe22_1)

    metan (SJ9-2 sbe24_3)


    I have been struggling with this for 4 days, and still can't get any wiser, so hopefully someone can point out what I should do

    I guess the best thing would be if someone could point out excactly the versions of the commands I need to install in order to make this work

    I have Stata SE/16.1, don't know if that could cause any trouble

    Could it be that some of the commands in the do-file is older then the versions I have installed and therefore might have typing errors?

    I'm very thankfull for your help

    Sincerely,
    Guest
    Last edited by sladmin; 03 Jan 2022, 07:33. Reason: anonymize original poster

  • #2
    And by the way the metan7 command looked like this (and not like wrote it in the previous post)
    metan7 logr loglb logub , eform random label( namevar=author ) ///
    effect(Relative Risk) ///
    xlabel(0.25, 0.5, 0.75, 1, 1.5, 2, 3, 5) ///
    force xtick(0.25, 0.5, 0.75, 1, 1.5, 2, 3, 5) nowt graph

    Comment


    • #3
      Hello Guest,
      I've just seen your post.
      Questions: Which version of State do you have?
      Could you share with us a screenshot of your module? It is generally easier like that!
      What do you mean by "double log lb = log (cilow)"? We don't see it used anywhere after...

      Options: I use metan (not metan7) and was able to run some of your commands without any problems...just that the graphs were not so impressive
      For the variables, I use the OR with the lower value of the CI (lci) and the upper value of the CI (uci), standard error of OR being (uni-lci)/3.92 & standard error of logOR being loguci-loglci/3.92

      Excerpt of my do.file

      "metan or lci uci, lcols (author1 Year)
      metan or lci uci, effect(or) lcols(author1 Year Total) astext(70) xlabel(1,...) xsize(0 1 2 3 4 ...) ysize(10) favours(...decrease...#... increase ...)
      metainf or lci uci
      metainf logor selogor, print id(author1)"


      Last edited by sladmin; 03 Jan 2022, 07:34. Reason: anonymize original poster

      Comment


      • #4
        Hi Guest and Nicky,

        [ FAO Nicky: "gen double log lb = log (cilow)" looks uncontroversial to me, Guest is (I assume) log-transforming an odds ratio and its confidence interval onto the correct scale for meta-analysis. I will respond below to both your other points and to Guest's questions. ]


        Guest, sorry to have missed your original post in January. You raise a couple of very important issues.

        The resource "Meta-Analysis in Stata: An updated Collection from the Stata Journal, second edition" is now a few years old; and in any case it is compiled so as to be comprehensive rather than practical. That is: it doesn't aim to tell you which commands are best to use; it just tells you which commands are available.

        Firstly: certain older commands such as metainf and metatrim will not run correctly under Stata 16, because in StataCorp's new built-in meta-analysis suite makes use of some overlapping command names, so Stata interprets lines of code as referring to the "wrong" commands. I presume you are using Stata 16 yourself, which is why you are seeing errors such as "subcommand meta __000005 is unrecognized".

        The latest version of metan (version 4.02 23feb2021) includes options cumulative and influence which replicate the functionality of the commands metacum and metainf. I am currently working on updates to metabias and metatrim to resolve the issue regarding Stata 16. Could you confirm whether metafunnel is working OK for you or not?



        To summarize: unfortunately, Stata 16 and its new built-in meta-analysis module has had some unintended consequences for various older meta-analysis commands. Many of those commands now have Stata 16 equivalents; see help meta (in Stata 16 only) for further information. Some of the older user-written commands have been renamed, and others still need to be updated. The resource "Meta-Analysis in Stata: An updated Collection from the Stata Journal, second edition" is unfortunately out-of-date and therefore less helpful than it should be. Your supervisor/counsellor may themselves be unaware of these complications.

        I hope this is helpful!

        Best wishes,

        David.
        Last edited by sladmin; 03 Jan 2022, 07:35. Reason: anonymize original poster

        Comment


        • #5
          Thank you for the clarification David!

          Comment

          Working...
          X