Announcement

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

  • Computing percent attenuation + its 95%CI between two models

    Dear statalisters,

    I am performing an analysis where I need to calculate the percent attenuation between two Confidence Intervals (of OR or RR or HR or beta).

    Essentially I have a CI for an unadjusted model and a CI for an adjusted model, and I want to compute the attenuation percentage between them, due to the covariable added in the adjusted model.

    In the literature the parameter is computed with the following formula.

    Code:
    percent_att=100 * (Beta_unadj - Beta_adj)/Beta_unadj
    Now I also want to compute the 95%CI for percent_att. Previous research states: "(...) we calculated a 95%CI around it using a bias corrected accelerated (BCa) bootstrap method with 2000 resampling."

    References are:
    Pubmed uid: 21364974
    Other ref: SAS Institute Inc. (2000) SAS/STAT user’s guide, version 8. Cary (North Carolina): SAS Institute Inc.

    However, I do not know how to this in SAS. I could program it however in STATA or R.

    Thank you for your kind reply

    Best

    Dusan

  • #2
    You can get both the percent attrition itself and a CI around it this way:

    Code:
    sysuse auto, clear
    regress price mpg
    estimates store unadj
    
    regress price mpg headroom i.foreign
    estimates store adj
    
    suest adj unadj
    
    nlcom 100*(_b[unadj_mean:mpg] - _b[adj_mean:mpg])/_b[unadj_mean:mpg]
    But this is not a bootstrap confidence interval. For a bootstrap confidence interval, you could do this:

    Code:
    capture program drop attenuation
    program define attenuation, rclass
        regress price mpg
        scalar unadj = _b[mpg]
        regress price mpg headroom i.foreign
        scalar adj = _b[mpg]
        return scalar att = 100*(unadj-adj)/unadj
        exit
    end
    
    
    sysuse auto, clear
    bootstrap att = r(att), reps(1000): attenuation
    Evidently in either case you will use your own data set and your own variables

    Note added: I haven't used SAS in several decades, and have not checked the references you provided, so I cannot assure you that my code is the exact same approach you are referring to. But this is how one would generally go about getting a bootstrap confidence interval for such a statistic in Stata.

    Comment


    • #3
      Dear Clyde,

      Thank you very much for this!

      Best

      Dusan

      Comment


      • #4
        Given that you refered to odds ratios, relative risk ratios, and hazard ratios I assume that you want to use this for non-linear models (e.g. logit, mlogit, stcox, or streg). Unfortunately, the formula won't work for non-linear models, see: http://maartenbuis.nl/publications/ldecomp.html
        ---------------------------------
        Maarten L. Buis
        University of Konstanz
        Department of history and sociology
        box 40
        78457 Konstanz
        Germany
        http://www.maartenbuis.nl
        ---------------------------------

        Comment


        • #5
          I was also wondering...
          What if I only have the sample size and the two CIs (i.e. taken from an article), would it still be possible to calculate the 95%CI for attenuation??

          I actually need to do a systematic review + meta analysis, studying this attenuation, so all the data comes from previously published papers. Therefore I do not have access to the data but to sample size, unadj CI, adj CI...

          Thanks a lot

          Dusan
          Last edited by Dusan Petrovic; 07 Mar 2016, 02:29.

          Comment


          • #6
            I don't think that is possible.
            ---------------------------------
            Maarten L. Buis
            University of Konstanz
            Department of history and sociology
            box 40
            78457 Konstanz
            Germany
            http://www.maartenbuis.nl
            ---------------------------------

            Comment


            • #7
              Ok, thanks a lot Maarten.

              Dusan

              Comment

              Working...
              X