Announcement

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

  • glm with binomial family and log link - Intraclass correlation coefficient

    Hi All,

    I am running a model to estimate relative risks using GLM with binomial family and log link; I would like to estimate the intraclass correlation coefficient - is this possible for this model?

    If not, is it acceptable to estimate the ICC based on a logistic model and assume it would be similar?

    Please feel free to point me to some resources

  • #2
    Your question is a bit confusing. The Stata -glm- command does not handle multi-level models, so intraclass correlation coefficient has no meaning in this context. Perhaps you mean that you will use -meglm-, which does support multi-level models. But then there is another problem: you cannot use the -binomial- family with the -log- link. Perhaps you meant the -logit- link? That combination is possible. And, if you do that, you can get the intraclass correlation afterwards with the -estat icc- command.

    That said, -meglm- with link(logit) and family(binomial 1) is exactly the same thing as a multi-level logistic regression, which you can code more simply and transparently with -melogit-. -melogit- also supports -estat icc- And, of course, the results will be identical. You can try this out yourself on one of the data sets from StataCorp:
    Code:
    clear*
    webuse bangladesh
    
    meglm c_use i.urban c.age || district:, link(logit) family(binomial 1)
    estat icc
    
    melogit c_use i.urban c.age || district:
    estat icc

    Comment


    • #3
      This appears to be a repetition of https://www.statalist.org/forums/for...gllamm-and-icc where the OP stated that they used the command gllamm from SSC. The log link is a valid function for the binomial family, and gllamm allows it.

      Comment


      • #4
        Ah, -gllamm-. I haven't used it in over a decade now and have largely forgotten it exists.

        I realize in retrospect that the way my post in #2 is worded, it could be interpreted as meaning that the combination of log link and binomial family is inherently invalid. As Andrew points out, it is not. But the point was trying to make, which is correct, is that it is not allowed with Stata's -meglm-.

        Comment


        • #5
          Apologies, I meant to say I am using -gllamm- specifying a binomial family and log link. In the thread shared by Andrew Musau it seems that even though -glamm- with log link and binomial family is allowed, it is not possible to estimate the ICC for such model - is that correct? is there any way around it?

          Comment


          • #6
            No it’s not possible because there isn’t a single ICC, per se, because the level 1 variance depends on the linear predictor. There are as many possible ICCs (potentially infinitely many) as there are covariate patterns admissible by your model.

            Comment


            • #7
              Originally posted by Leonardo Guizzetti View Post
              No it’s not possible because there isn’t a single ICC, per se, because the level 1 variance depends on the linear predictor. There are as many possible ICCs (potentially infinitely many) as there are covariate patterns admissible by your model.
              It's not my intention to derail the thread, but could someone clue me in on how to implement (simulate) the data-generating process that "specifying a binomial family and log link" is supposed to model?

              I can readily implement the data-generating process corresponding to the hierarchical logistic regression case—for an off-hand example, see here—and even that of the multilevel risk-difference case, as ugly as it is. But I seem to be having trouble with this one. Can anyone on the list provide pointers?

              Comment


              • #8
                Originally posted by Joseph Coveney View Post
                It's not my intention to derail the thread, but could someone clue me in on how to implement (simulate) the data-generating process that "specifying a binomial family and log link" is supposed to model?

                I can readily implement the data-generating process corresponding to the hierarchical logistic regression case—for an off-hand example, see here—and even that of the multilevel risk-difference case, as ugly as it is. But I seem to be having trouble with this one. Can anyone on the list provide pointers?
                Dear Joseph, here are two papers which discuss simulation of the log-binomial model which you might find useful. I have not implemented these in Stata.

                1. Bakbergenuly I, Hoaglin DC, Kulinskaya E. Pitfalls of using the risk ratio in meta-analysis. Res Syn Meth. 2019; 10: 398–419. https://doi-org.proxy1.lib.uwo.ca/10.1002/jrsm.1347

                2. Clark RG, Barr M. A blended link approach to relative risk regression. Statistical Methods in Medical Research. 2018;27(11):3325-3339. doi:10.1177/0962280217698174

                Comment


                • #9
                  Thank you, Leonardo. I'll take a look at them both.

                  Comment


                  • #10
                    Thank you Leonardo Guizzetti - is there any point estimating it using a logistic model?

                    Comment


                    • #11
                      I think it would be ok to report an ICC from a normal mixed model, acknowledging that it is the model the ICC estimate came from and has the inherent assumptions of normality. I would not lean to heavily on interpreting the value of the ICC though.

                      Comment


                      • #12
                        Thanks for your response Leonardo Guizzetti

                        Comment

                        Working...
                        X