Announcement

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

  • Test for a difference between two ratios

    I suspect I should know the answer to this question, but I don't.

    I am interested in whether the association between an exposure (having CMV infection) and an outcome (death) are the same in individuals who receive a transplant from a CMV positive vs a CMV negative donor. If I had access to the raw data, I could test for an interaction. However, I only have access to published results from a number of different studies, e.g.
    Adjusted OR (95% CI) p value
    CMV negative donor
    CMV negative recipient 1.0 (reference)
    CMV positive recipient 1.04 (0.88 - 1.23) 0.63
    CMV positive donor
    CMV positive recipient 1.0 (reference)
    CMV negative recipient 1.21 (1.07 - 1.36) 0.003
    A lot of the papers simply say that an association was seen with CMV+ donors but not CMV- donors, so QED. I think the right thing to do is to test for a difference in ratios? Is there a way to do this, using published summary statistics, ideally in STATA?

    Thanks,
    Tom
    Last edited by Tom Yates; 08 Feb 2024, 10:35.

  • #2
    Hello Tom Yates. If they were crude ORs, you could just do this, I think:
    Code:
    clear
    input or0 lb0 ub0 or1 lb1 ub1
    1.04 0.88  1.23  1.21 1.07 1.36
    end
    generate y0 = ln(or0)
    generate y1 = ln(or1)
    generate se0 = (ln(ub0) - ln(lb0)) / 3.92
    generate se1 = (ln(ub1) - ln(lb1)) / 3.92
    generate ydiff = y1-y0
    generate sediff = sqrt(se0^2 + se1^2)
    generate ratio = exp(ydiff)
    generate ratiolb = exp(ydiff - 1.96*sediff)
    generate ratioub = exp(ydiff + 1.96*sediff)
    list ratio*
    * Check that ratio of ORs is correct:
    display "Ratio of two ORs = " or1/or0
    Output:
    Code:
    . list ratio*
    
         +--------------------------------+
         |    ratio    ratiolb    ratioub |
         |--------------------------------|
      1. | 1.163462   .9469237   1.429516 |
         +--------------------------------+
    
    . * Check that ratio of ORs is correct:
    . display "Ratio of two ORs = " or1/or0
    Ratio of two ORs = 1.1634616

    But your post shows that they are adjusted ORs, so I'm not entirely sure how or if that might affect things. I believe both ORs are from the same model, so they are adjusted for the same variables. And in that case, I suspect the method above should work. But another forum member might know something I don't!
    --
    Bruce Weaver
    Email: [email protected]
    Version: Stata/MP 18.5 (Windows)

    Comment


    • #3
      Many thanks, Bruce Weaver.

      Yes, I think covariate adjustment is the same in both models.

      Annoyingly, in this example, the baseline group differs between the two models. But, I think, I can simply invert the effect estimate and the ends of the confidence interval for one of the ratios before using it as an input into your code.

      In the set of studies I am looking at, I may have other effect measures, e.g. hazard ratios, rate ratios, risk ratios. Where the event rate is low, e.g. <10% of the sample, we expect these measures to be very similar. For studies with longer follow up, the event rate may exceed 10%. I am struggling to think whether your code would also work for hazard ratios, rate ratios, risk ratios?

      Best wishes,
      Tom

      Comment

      Working...
      X