Announcement

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

  • Meta-analysis of Hazard ratios

    Hi,
    I am using Stata version 17. I am trying to undertake a meta-analysis of survival data with Hazard ratios and 95% CI. I'd like to create forest plots, funnel plots and perform Egger's test, however, I am not sure how to go about this. I have seen some other forums discuss this, where they have suggested to log transform the HR and 95% CI and use a particular command, however, it seems to be for older versions of Stata, which I couldn't seem to get to work in Stata version 17. I refer to this post for reference: https://www.statalist.org/forums/for...r-hazard-ratio

    Thank you
    Kind regards
    John

  • #2
    Hi John,

    Any effect measure on the ratio scale (hazard ratio, odds ratio, risk ratio/relative risk) needs to be log-transformed before pooling (as do the 95% confidence limits). Having done this, there are a number of commands available.

    The thread you linked to is now outdated; the command mentioned, admetan, is now deprecated in favour of an updated metan (current version is v4.08 17jun2024). This is a user-contributed command which continues to be maintained and updated, and runs on any Stata version since v11. Alternatively, with Stata 17 you also have access to a built-in suite of meta-analysis commands.

    Briefly, (and using the same example data as in the linked thread, for simplicity) here is run a basic meta-analysis and obtain forest plots and funnel plots...

    Code:
    * Example generated by -dataex-. To install: ssc install dataex
    clear
    input str14 study float(hr lci uci)
    "Harris 2015a"   .024 .003 .17
    "Harris 2015b"   .154 .027 .909
    "Fristrup 2013a"   .6  .39  .93
    "Fristrup 2013b"  .79  .51 1.25
    end
    
    gen double loghr = ln(hr)
    gen double loglci = ln(lci)
    gen double loguci = ln(uci)
    label variable study Study
    ...with user-contributed metan:
    Code:
    metan loghr loglci loguci, hr model(dl) study(study) forestplot(xlabel(.01 .1 1 10))
    metafunnel _ES _seES, egger
    metabias _ES _seES, egger graph
    ...and with official Stata's meta:
    Code:
    meta set loghr loglci loguci, studylabel(study) eslabel(Haz. Ratio) random(dl) civartol(.05)
    meta forestplot
    meta funnelplot
    meta bias, egger

    Comment


    • #3
      Hi David,

      This is excellent. Thank you for sending this through. Just to clarify, what does civartol(.05) mean? It looks to be a tolerance for something and in my case when I left it to 0.05 it didn't seem to work "confidence intervals not symmetric" despite the log transformation. I had to increase it to 0.4 - is this appropriate to do?
      Also, the eslabel is "Haz. Ratio" - should this be "Log Haz. Ratio" as we've done the log transformation?

      Thank you
      Kind regards
      John

      Comment


      • #4
        Hi John,

        Thankyou -- those are both excellent questions. Because I am the co-developer and maintainer of metan, I tend to use that command most often; and so am less familiar with the built-in commands.

        Firstly: civartol() specifies the tolerance for the symmetry of the observed confidence intervals. In your case, these are supplied by yourself, taken from publications or similar. They may be rounded, or subject to typos, and so Stata checks to see if the lower and upper limits are equally separated from the central estimate. (This is done on the log-transformed scale, of course -- which is another good reason why we transform before carrying out meta-analysis.)

        If we take our example data, log-transform it, and calculate the differences between the limits and the central estimate:
        Code:
        . gen double lower_diff = abs(loglci - loghr)
        . gen double upper_diff = abs(loguci - loghr)
        . gen double reldiff = reldif(lower_diff, upper_diff)
        . list
        We see that the relative difference is largest for observation #1, at 0.041. This is why I set the tolerance to 0.05. The reason for the difference is probably the very small lower limit of 0.003 on the HR scale, which will be prone to inaccuracy.


        Secondly: yes you are right, meta set and meta forestplot are a little unintuitive when handling pre-estimated ratio measures, as we are here. The best approach is probably to re-define the title of the effect size column when creating the forestplot, for which we use the column(, supertitle()) option:

        Code:
        meta set loghr loglci loguci, studylabel(study) random(dl) civartol(.05) eform
        meta forestplot, eform col(_esci, supertitle(Hazard ratio))

        Comment


        • #5
          Thank you David for explaining this.
          I forgot about the eform command - yes, that is very handy to produce the HR rather than the Log HR.

          Kind regards
          John

          Comment

          Working...
          X