Announcement

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

  • metan: A comprehensive update to the popular meta-analysis command


    With thanks as ever to Kit Baum, I am excited to announce a major update to the user-written command "metan", version 4.0, now available via SSC.

    Firstly, a bit of history: as described in this thread I previously released v3.x of the admetan / ipdmetan meta-analysis command suite, and presented it at the 2018 London UK Stata Conference. One of the discussions that emerged was the possibility of merging admetan with the ever-popular but venerable metan, which had not been updated for a decade and currently has no dedicated support. Over the past year I have worked with Professor Jonathan Sterne, a co-author of metan, and Professor Julian Higgins -- both eminent figures in the meta-analysis field -- to make this happen. An important aspect of this work has been to make the update as seamless as possible -- that is, to enable existing metan users to continue to use the command in the same way as before, if they so wish. We have also ensured that all default behaviour is in keeping with current best practice in the field.

    Much of the "new" functionality is simply carried over from admetan, and as such is described in this thread. However, all new behaviour, and differences from the previous version and from Stata 16's meta suite, are fully documented in the *.sthlp files. In particular:
    • Standard heterogeneity output, including I-squared, is always based on a single Q statistic calculated directly from the data (either Cochran's Q, or a common-effect alternative e.g. using the Mantel-Haenszel log-effect size and weights) rather than on tau-squared. Tau-squared is reported in a separate table. If the user also wishes to see I-squared as derived from tau-squared and sigma-squared (see Higgins & Thompson 2002), they may use the option isqparam (see documentation).
    • Returned and saved effect sizes, standard errors and confidence intervals are *always* on the interval/log scale, even with Mantel-Haenszel methods. This avoids confusion when comparing between models (see below) and enables standardised interface with other commands. (However, note that previously-returned statistics such as r(RR) are still, additionally, available.)
    • A major new feature: the results of multiple models -- inverse-variance, Mantel-Haenszel, DerSimonian-Laird, REML, and so on -- may be presented simultaneously beneath the list of individual studies on-screen and in a forest plot. Presented weights are taken from the first model in the list. All pooled results, heterogeneity statistics etc. are returned in matrices. This can also be combined with a (single) subgroup variable with by().
    • metan now incorporates the functionality of the user-written programs metacum, metaninf and metaprop, respectively for cumulative and influence meta-analysis and meta-pooling of proportions. The older programs call metan from within them, and *should* still work OK (due to our desire for the update to be seamless), but it is recommended that metan now be used instead, with the options cumulative, influence or proportion as required (see documentation).
    As a result of this update, the admetan package will no longer be maintained. However, ipdmetan remains as a separate package -- albeit with a dependency on metan -- and will continue to be maintained (a small update to ipdmetan is also now available via SSC).

    Since this is such a major update, there are bound to be teething troubles; so please don't hesitate to contact me (d.fisher@ucl.ac.uk) with any bugs or other issues. If all else fails, the previous version of metan is still available within the package under the name metan9.ado.

    I hope you find the updated package useful.

    Season's greetings to all!

    David.


    David Fisher
    Statistician
    MRC Clinical Trials Unit at UCL, London, UK
    e-mail: d.fisher@ucl.ac.uk


    P.S. Apologies to anyone who has started threads here, or replied to existing threads, with issues related to admetan, ipdmetan or forestplot (or, indeed, metan) over the last couple of months; I've been putting all my energy into getting this update out. I will now try to catch up!

  • Suhail Doi
    replied
    Hi David, that works great, thanks - seems I missed this in the help file!

    Regards
    Suhail

    Leave a comment:


  • David Fisher
    replied
    Hi Suhail,
    I think the metan option extraline(yes) should do what you need.
    Thanks,
    David.

    Leave a comment:


  • Suhail Doi
    replied
    Hi David,

    Another small suggestion for a future update - for the forestplot, if the het stats are by default on the next line after overall then it makes formatting easier. Currently they are on the same line and need adding a column before the CI plot to move them to the next line

    Regards
    Suhail

    Leave a comment:


  • Suhail Doi
    replied
    Hi David,

    Many thanks for the update. Something has changed with the "range" option in forestplot (only for proportions). For example if I run the below, it used to work perfectly in the previous version but now I cannot use range to get a well fitted plot no matter what I try and even if I remove the denom option

    Code:
    input str3 studyname long n int cases byte qi
    "S1"  217154 422 1
    "S10"  16557  32 1
    "S13"    676   1 1
    "S18"     44   1 1
    "S26"     29   1 1
    end
    
    
    metan cases n  , pr qe(qi) transform(ftukey, iv) study( studyname ) counts forestplot(astext(85) boxscale(35) spacing(0.99) leftjustify range(0.1 20) dp(3)) denom(1000)
    Please advise
    Regards
    Suhail
    Last edited by Suhail Doi; 06 May 2021, 15:33.

    Leave a comment:


  • David Fisher
    replied
    Luis Furuya-Kanamori : Unfortunately, upon opening this thread to post the above, I realise that I completely missed your post #16. Really sorry about that; this will be top of the list for the next update! In the meantime, here is a work-around which I hope is acceptable:

    Code:
    preserve
        metan mild n, pr model(re \ 0.50 0.40 0.60) transform(ftukey, iv) counts clear nograph
        foreach x in ES LCI UCI {
            replace _Prop_`x' = _`x' if _LABELS=="Overall, User"
        }
        forestplot, useopts
    restore
    Transformed proportion data is currently handled as a unique case in metan, because the Freeman-Tukey transform and back-transform are complex. The exponential/log transform is simple, so I only need to store the log-transformed values and exponentiate them as and when needed. But with transformed proportion data I need to maintain two different sets of effect sizes. The bug you have found is a result of metan looking in the wrong place for the user-defined values. The code above copies these values and pastes them in the correct place.

    Apologies again, and best wishes,

    David.

    Leave a comment:


  • David Fisher
    replied
    Dear all,

    With thanks as ever to Kit Baum, an updated version of metan (v4.03 28apr2021) is now available via SSC.

    The following bugs have (hopefully) been fixed:Thanks to all users who have reported issues; please continue to do so!

    Best wishes,

    David.


    P.S. Please note that, as a result of this update, users of ipdmetan will also need to update that package (via SSC). The latest version of ipdmetan is now v4.02 20apr2021.
    Last edited by David Fisher; 04 May 2021, 04:43.

    Leave a comment:


  • Suhail Doi
    replied
    Luis Furuya-Kanamori and David Fisher I don't think we should open up user defined tau2 for other models especially QE or IVhet as they only work with DL values and thus would open this up to wrong implementation and then another series of problems....

    Regards
    Suhail

    Leave a comment:


  • Luis Furuya-Kanamori
    replied
    Hi David Fisher,
    I think I found a bug - when I do a proportion meta-analysis using the options 'model' and 'user_spec', in the forest plot, the diamond does not appear and ‘(Insufficient data)’ appears instead of the pooled estimate.
    These options seem to work fine with standard (non-proportion) meta-analysis.

    Attached is the dataset and the command I used
    Code:
    metan mild n, pr model(re \ 0.50 0.40 0.60) transform(ftukey, iv) counts

    Also, would it be possible to active the option 'sa [, isq(real) tausq(real)]' for non-standard models or modifications to standard models (at the moment it only works with standard inverse-variance random-effects model).

    Regards,
    Luis
    Attached Files

    Leave a comment:


  • David Fisher
    replied
    Nicoletta Riva Thanks for the feedback, great to hear!

    Carole Khairallah :
    Thanks for the bug report. I think I have identified and fixed it (privately), but of course I am only working with my own data and not with yours. Also, I am still unsure what is going on when you say "I could get estimates from that particular study before". Therefore, could you please do one of the following things for me?
    (1) Send me (via Private Message) a copy of your working data and code which reproduces the error. Anonymised and/or sampled if necessary, just so long as the error is present.
    or (2) Send me a Private Message with a contact email address for you, so that I can send you a corrected version of the program which you could run on your data and feed-back on whether it works or not.

    Many thanks, and best wishes,

    David.

    Leave a comment:


  • Nicoletta Riva
    replied
    Thanks a lot David!!

    metan [varlist], proportion transform(ftukey, iv) works great!

    Best regards,

    Nicoletta

    Leave a comment:


  • Carole Khairallah
    replied
    Thank you for the update.
    However, since I updated my ado files, I get a warning when using ipdmetan with aggregated data from 1 study, while I could get estimates from that particular study before.
    Code:
    Note: 1 study with missing or insufficient data found;  use the keepall option to include this study in the summary table and forest plot
    Also, adding the option "keepall" to show the study that was excluded from the model returns an error
    Code:
    >1 invalid name
    Error in ipdmetan.metan_setup
    Is there a way to run an earlier version of ipdmetan? It may not be related to the update, but I can't think of anything else...I am using Stata v16.1.
    Please see below the syntax I use for ipdmetan
    Code:
     ipdmetan, study(study) ad(Data\temp\nigeria_bin21.dta, byad vars(_ES _lci _uci)) saving(Data\temp\bin21.dta, replace): glm bin21 arm01 i.Grav3Gr, fam(bin) link(log) eform
    Would you have any suggestion? Thanks in advance for your help.
    Best regards,
    Carole

    Leave a comment:


  • Suhail Doi
    replied
    Hi David,

    Just noted that the cumulative command on the proportions forest plot in metan and on the table output only changes the weights but not the rest of the plot or the table output.

    Regards
    Suhail

    Edit: It does work as intended if we omit the tr(xyz , x) command

    Last edited by Suhail Doi; 26 Feb 2021, 03:05.

    Leave a comment:


  • Luis Furuya-Kanamori
    replied
    Many thanks David, it is working well now

    Luis

    Leave a comment:


  • David Fisher
    replied
    With thanks as ever to Kit Baum, an updated version of metan (v4.02)is now available via SSC.

    The bugs identified by Nicoletta Riva and by Luis Furuya-Kanamori have now (hopefully!) been fixed.

    Many thanks to daniel klein for suggesting a solution to the first bug and for help with testing under Stata 11.2 and 12.1, and to Suhail Doi for helping me to track down the second bug.

    Additionally, the method described in post #5 is now implemented as: metan [varlist], proportion transform(ftukey, iv)

    Best wishes to all,

    David.

    Leave a comment:

Working...
X