Announcement

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

  • Lincom based confidence intervals

    Hello,

    This is a long post, but I am really trying to get some clarification.
    I ran a regression output to determine the association of agreement between graders with image quality. I want to calculate the odds ratio (OR), but my model failed to converge when using a logistic regression. So I ran a Poisson regression to get the risk estimates and then tried to transform it to OR.

    Below is the model output obtained by running the code:
    meglm ccl_agree i.image2 || patient_id:, family(poisson) link(log) vce(r) eform.


    ------------------------------------------------------------------------------
    | Robust
    ccl_agree | exp(b) std. err. z P>|z| [95% conf. interval]
    -------------+----------------------------------------------------------------
    image2 |
    2 | .9284862 .0389798 -1.77 0.077 .8551458 1.008116
    3 | 1.020223 .0192448 1.06 0.289 .9831922 1.058648
    |
    _cons | .8786232 .0118317 -9.61 0.000 .8557368 .9021217
    -------------+----------------------------------------------------------------
    patient_id |
    var(cons) | 5.85e-35 5.55e-36 4.86e-35 7.05e-35



    I then used the lincom function to get risk from risk ratio , _cons = acceptable image quality, 2.image2 = poor image quality


    ------------------------------------------------------------------------------
    ccl_agree | exp(b) Std. err. z P>|z| [95% conf. interval]
    -------------+----------------------------------------------------------------
    (1) | .8157895 .033182 -5.01 0.000 .7532788 .8834876
    ------------------------------------------------------------------------------




    Based on these results, when I calculate the odds ratio [using R/1-R], I get a significant association (CI does not overlap null)


    di [.8157895 / (1-.8157895)] / [.8786232 / (1-.8786232)] //0.611 = OR estimate for poor vs acceptable
    di [.7532788 / (1-.7532788)] / [ .8557368 / (1- .8557368)] //.5147124 = CI lower limit
    di [.8834876 / (1-.8834876)] / [ .9217735 / (1- .9217735)] //.64351399 = CI upper limit



    But this does not make much sense to me, as the OR is significant here [OR: 0.611, CI: 0.51 - 0.64] but from the model above the estimate is clearly not significant for RR. Further along, when I calculate the values by hand (see below), I get different CI values (which are not significant) [OR: 0.611, CI: 0.46 - 1.09].


    ------------------------------------------------------------------------------
    | Robust
    ccl_agree | Coefficient std. err. z P>|z| [95% conf. interval]
    -------------+----------------------------------------------------------------
    image2 |
    2 | -.0741998 .0419822 -1.77 0.077 -.1564833 .0080837
    3 | .0200207 .0188633 1.06 0.289 -.0169507 .0569922
    |
    _cons | -.1293992 .0134662 -9.61 0.000 -.1557924 -.1030059
    -------------+----------------------------------------------------------------
    patient_id |
    var(_cons)| 5.85e-35 5.55e-36 4.86e-35 7.05e-35
    ------------------------------------------------------------------------------



    ------------------------------------------------------------------------------
    ccl_agree | Coefficient Std. err. z P>|z| [95% conf. interval]
    -------------+----------------------------------------------------------------
    (1) | -.203599 .0406747 -5.01 0.000 -.2833199 -.123878
    ------------------------------------------------------------------------------



    di exp(-.0741998)
    //E(Y_poor)/E(Y_accept)=exp(-.0741998) = .92848616

    di exp(-.1293992)
    //E(Y_accept) = exp(-.1293992) = .87862315

    di exp(-.1293992 + (-.0741998) )
    //E(Y_poor) = exp(-.1293992 + (-.0741998)) = .81578944

    di [.81578944/(1- .81578944)] / [.87862315/(1-.87862315)]
    //OR estimate = [.81578944/(1- .81578944)] / [.87862315/(1-.87862315)] = .61178212



    //Lower Limit - CI
    di exp(-.1564833)
    //E(Y_poor)/E(Y_accept)=.8551458

    di exp(-.1557924)
    //E(Y_accept) =.85573682

    di exp(-.1557924 + (-.1564833) )
    //E(Y_poor) = .73177975

    di [.73177975/(1- .73177975)] / [.85573682/(1-.85573682)]
    //OR = .4599431


    //Upper Limit = CI
    di exp(.0080837)
    //E(Y_poor)/E(Y_accept)=1.0081165

    di exp(-.1030059)
    //E(Y_accept) =.90212165

    di exp(-.1030059 + (.0080837) )
    //E(Y_poor) = .90944369

    di [.90944369/(1- .90944369)] / [.90212165/(1-.90212165)]
    //OR = 1.0896289


    I am extremely confused as to which values should I rely on, and which approach is appropriate. Why is it that I am getting same OR estimate but different CI? Any advice would be helpful.
    Thank you!

  • #2
    Before you start doing all that, you should first consider what went wrong with the melogit model. We have a pretty good indication in your output: Look at the variance of your random constant: 5.85e-35, that is 0.0000000000000000000000000000000000585 (I might have miscounted one or two zeros). Lets just call that 0. So you can just use a regular logit.
    ---------------------------------
    Maarten L. Buis
    University of Konstanz
    Department of history and sociology
    box 40
    78457 Konstanz
    Germany
    http://www.maartenbuis.nl
    ---------------------------------

    Comment


    • #3
      Thank you for your response!
      I checked for the correlation of outcome at patient level and the data suggested high correlation here (output shown below). So, I initially used the melogit function with patient_id as the random variable. However, that model fails to converge, hence I used the mepoisson model to generate estimates. Based on the high correlation, can I use the regular logit?

      Mixed-effects logistic regression Number of obs = 2,153
      Group variable: patient_id Number of groups = 1110

      Obs per group:
      min = 1
      avg = 1.9
      max = 2

      Integration points = 7 Wald chi2(0) = .
      Log likelihood = -653.7609 Prob > chi2 = .

      ------------------------------------------------------------------------------
      ccl_agree | Coefficient Std. err. z P>|z| [95% conf. interval]
      -------------+----------------------------------------------------------------
      _cons | 5.652283 .7476635 7.56 0.000 4.18689 7.117677
      ------------------------------------------------------------------------------

      ------------------------------------------------------------------------------
      Random-effects parameters | Estimate Std. err. [95% conf. interval]
      -----------------------------+------------------------------------------------
      patient_id: Identity |
      sd(_cons) | 4.029297 .4641921 3.214898 5.049999
      ------------------------------------------------------------------------------
      LR test vs. logistic model: chibar2(01) = 271.02 Prob >= chibar2 = 0.0000

      . estat icc

      Residual intraclass correlation

      ------------------------------------------------------------------------------
      Level | ICC Std. err. [95% conf. interval]
      -----------------------------+------------------------------------------------
      patient_id | .8315057 .0322811 .7585496 .8857381
      ------------------------------------------------------------------------------

      Comment


      • #4
        A possible explanation is that your explanatory variable accounts for all variation at the patient_id level. So after controlling for image2 there is no variance left on the patient_id level. You know your data, and how it was collected. You now have to decide whether that is plausible. Alternatively, look for missing data.
        ---------------------------------
        Maarten L. Buis
        University of Konstanz
        Department of history and sociology
        box 40
        78457 Konstanz
        Germany
        http://www.maartenbuis.nl
        ---------------------------------

        Comment


        • #5
          Thank you!

          Comment

          Working...
          X